Torsten Curdt wrote:

Hm ... but if I surround my task's work with lock/unlock wouldn't this
block the calling thread until the worker thread has done it's work?


Follow the existing example from "Threading Programming Guide", under the "Using Conditions" section. It's simple and clear. If it doesn't work, then post again.

If it works but you don't understand why, then that would be another reason to post again. But if you don't follow the existing advice that's documented as working correctly, speculating about other approaches is simply wasted effort.

You might also look at the NSLock or NSConditionLock class, as they may be closer to what you're trying to do. And again, follow the examples in "Threading Programming Guide".

  -- GG



_______________________________________________

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

Reply via email to