• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: are the doc NSLock examples bogus?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: are the doc NSLock examples bogus?


  • Subject: Re: are the doc NSLock examples bogus?
  • From: Uli Kusterer <email@hidden>
  • Date: Mon, 13 Feb 2006 13:48:35 +0100


Am 12.02.2006 um 18:50 schrieb Matt Neuburg:

BOOL moreToDo = YES;
NSLock *theLock = [[NSLock alloc] init];
...
while (moreToDo) {
    /* Do another increment of calculation */
    /* until there’s no more to do. */
    if ([theLock tryLock]) {
        /* Update display used by all threads. */
        [theLock unlock];
    }
}

File a doc bug. They should really mention that the stuff before the "..." is initialisation of globals, while the stuff after it is inside some function.


Cheers,
-- M. Uli Kusterer
http://www.zathras.de


_______________________________________________ Do not post admin requests to the list. They will be ignored. Cocoa-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
References: 
 >are the doc NSLock examples bogus? (From: Matt Neuburg <email@hidden>)

  • Prev by Date: Re: Using zlib for i386 (or Universal) builds on PPC clients
  • Next by Date: NS_DURING and return
  • Previous by thread: Re: are the doc NSLock examples bogus?
  • Next by thread: Finding all applications registered with launch services?
  • Index(es):
    • Date
    • Thread