Boost logo

Boost Users :

Subject: Re: [Boost-users] Poor/erratic boost::interprocess named_semaphore performance
From: Ion Gaztañaga (igaztanaga_at_[hidden])
Date: 2012-02-13 07:54:41

El 13/02/2012 11:25, Nathaniel J Fries escribió:
> From quickly looking at the header files it appears that there is no
> Windows implementation of the synchronization portion of the library,
> and instead a generic user-space mechanism is used.
> All POSIX systems (Linux, Mac) use POSIX mechanisms.
> It appears relatively simple to port, if you're already familiar with
> the Windows API code for it. The POSIX implementation of semaphores is
> done in fewer than 50 lines.

Not so easy if you want to achieve the same POSIX lifetime guarantees.
There is an implementation in my head to achieve better windows
performance using windows native synchronization primitives, but that
would need to wait until I find some time as I have tons of bugs, ideas
and requests for Container, Intrusive and Move.

Things could be improved a bit not calling thread_yield in every loop
step in spin_semaphore::wait() (Boost 1.49).


Boost-users list run by williamkempf at, kalb at, bjorn.karlsson at, gregod at, wekempf at