OmegaDelta.net

Hong Kong

iPhone Mutex/Sempahore

Looking for Mutex and Semaphore in the iPhone SDK?  The classes you want are NSLock and NSConditionLock.  You can use NSConditionLock just like a semaphore.

Here’s a good NSConditionLock example

For Mutex’s, use @synchronized(self), or another NSLock object.

Leave a Reply