On Apr 28, 2014, at 13:02 , Ken Thomases <k...@codeweavers.com> wrote:
> I've seen this discussed before, but I don't remember where. One of the > Apple engineers acknowledged the issue. This check is not done (or not > effective) if the semaphore is created with a value of 0. It was here, a few months ago. I was complaining about this — there are situations involving Cocoa frameworks where you don’t get the opportunity to restore the value back to its original setting. Greg Parker stated that it’s a feature, not a bug. > So, the workaround is to create it with a value of 0 and then call > dispatch_semaphore_signal() to increase the value up to the size of your > resource pool. Indeed. It’s a minor irritation to have to remember to do so. _______________________________________________ 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: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com