NSConditionLock vs MPQueue
NSConditionLock vs MPQueue
- Subject: NSConditionLock vs MPQueue
- From: Trygve Inda <email@hidden>
- Date: Mon, 11 Aug 2008 14:07:07 +0000
- Thread-topic: NSConditionLock vs MPQueue
I am using NSConditionLock in Cocoa but it seems unable to match the
capabilities of MPQueue for my needs.
I am using
-- from my worker thread, do something on the main thread --
[lock lockWhenCondition:kTaskComplete];
In the Carbon version I used MPWaitOnQueue.
The difference is that MPWaitOnQueue can wait for any signal to be received.
I need to wait on either kTaskComplete or kTaskAbort
With MPQueue I could send either kTaskComplete or kTaskAbort, but with
NSConditionLock I can only wait on a single condition.
Is there some other method that will let me block on "A or B" ?
Thanks,
Trygve
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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:
This email sent to email@hidden