> On Oct 7, 2016, at 10:05 AM, Quincey Morris 
> <quinceymor...@rivergatesoftware.com> wrote:
> 
> Surely “anyone reading the code” is going to recognize “dispatch_semaphore” 
> as something to do with a semaphore, including people from other platforms?

You’re right; I was [mis]remembering a classic semaphore as being a simple 
mutex lock, but a look at Wikipedia corrected me: it has the counting semantics 
that dispatch_semaphore does.

I still say it’s massive overkill to use it in a simple atomic increment task, 
as Gerriet’s performance figures show. You might still say that 80x faster 
isn’t important, but that depends on what you’re doing. I often work on highly 
performance-sensitive code, as Gerriet also does apparently. 

—Jens
_______________________________________________

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

Reply via email to