Subject: Re: [boost] Request for interest in the new Synchro library
From: Dmitry Goncharov (dgoncharov_at_[hidden])
Date: 2009-02-19 02:37:00
>> What type of semaphore are you planning to have in your library?
> currently Synchro provides the same semaphore as Boost.Interprocess (counting semaphores), except that it uses Threads resources on a inter-threads context, and Interprocess resources on a inter-process context.
> The library could provide binary semaphores (the difference is minimal).Could you talk us about your use case, and why a mutex cannot be used in your context?
I need to block a thread until either a timeout expires or some other
thread wakes this one up. This is really what
condition_variable::timed_wait() is for, right?
Why can't condition_variable::timed_wait() be used? It can. It has a
After the condvar was signaled it has to lock a mutex. This means there
is an unbound timeout between the time condvar was signaled and the time
A binary_semaphore::timed_wait() can be used for the same purpose. The
advantage is it doesn't have to lock a mutex.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk