$include_dir="/home/hyper-archives/boost/include"; include("$include_dir/msg-header.inc") ?>
Subject: Re: [boost] [thread] semaphore
From: Tim Blechmann (tim_at_[hidden])
Date: 2013-09-18 07:03:28
>> many use cases is not necessary. and locks are not free, as they involve
>> memory barriers and atomic operations. and how many platforms implement
>> PI mutexes?
>
> Don't semaphores involve memory barriers and/or atomics too? POSIX
> semaphores do.
>
> (N.B. I'm not disputing that semaphores have less overhead than CVs.)
they do, but much less: according to some micro-benchmarks with much
contention, dispatch semaphores on osx are about 80 times faster than
CVs, while posix semaphores on linux are about 30 times faster.