• 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
NSConditionLock vs MPQueue
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Follow-Ups:
    • Re: NSConditionLock vs MPQueue
      • From: Scott Ribe <email@hidden>
    • Re: NSConditionLock vs MPQueue
      • From: "Michael Ash" <email@hidden>
  • Prev by Date: Re: How to check the capital letter?
  • Next by Date: addObserver:
  • Previous by thread: Re: How to check the capital letter?
  • Next by thread: Re: NSConditionLock vs MPQueue
  • Index(es):
    • Date
    • Thread