Try NSConditionLock. Its documentation should be pretty self-explanatory.
-Heath Borders heath.bord...@gmail.com Twitter: heathborders http://heath-tech.blogspot.com On Thu, May 5, 2011 at 8:33 AM, eveningnick eveningnick <eveningn...@gmail.com> wrote: > Hello > I have a thread A that spawns a thread B, and should stop, waiting > before the thread B allows thread A to continue. > > In Windows, in a thread A, before spawning a thread B, i would create > a synchronization "Event" primitive in the "non signaled" mode, the > spawn a thread B, and call WaitForSingleObject(), waiting for thread B > to switch the "Event" into the "signaled" mode, which would release > the WaitForSingleObject() and allow the thread A to continue to > operate. > > (WaitForSingleObject() freezes the thread, until the object that it is > waiting for - e.g., an "Event" primitive - is switched into a > "signaled" mode). > > In OS X i have no idea how to do that :S I guess it is impossible to > do the same job using mutexes? Maybe some other primitives exist? > > I need this _only_ for debugging, it would greatly simplify my life. I > am well aware that this is approach is deadlock-prone. > > Thanks for the response if i get one > _______________________________________________ > > Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) > > Please do not post admin requests or moderator comments to the list. > Contact the moderators at cocoa-dev-admins(at)lists.apple.com > > Help/Unsubscribe/Update your Subscription: > http://lists.apple.com/mailman/options/cocoa-dev/heath.borders%40gmail.com > > This email sent to heath.bord...@gmail.com > _______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com