Boost logo

Boost :

Subject: Re: [boost] Request for interest in the new Synchro library
From: Dmitry Goncharov (dgoncharov_at_[hidden])
Date: 2009-03-10 04:35:58


vicente.botet wrote:
>>> Well all depends, on how the Semaphore::timed_wait is implemented.
>>>
>>>
>>>
>> Exactly. It should be just a call to sem_timedwait() on posix. Other
>> implementations are possible. Anyway, on posix any proper implementation
>> of semaphore::timed_wait() should be more efficient than
>> condition_variable::timed_wait(), because
>> condition_variable::timed_wait() has to lock a mutex in order to return.
>>
>
> I can use the sem_ family functions where available.
That is, probably, the most correct solution.

> But we need a implementation on the other platforms.
>
Other platforms should have some implementation of semaphore. On windows
there's CreateSemaphore(), etc.
For some platform which doesn't have semaphores it is possible to
implement one using a pipe.

BR, Dmitry


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk