|
Boost : |
From: Peter Dimov (pdimov_at_[hidden])
Date: 2004-07-12 12:08:23
Alexander Terekhov wrote:
> Peter Dimov wrote:
>
> [... Mutex * mutex() const ...]
>
> And the Mutex thing (std0X::whatever) shall also provide something
> like
>
> pthread_mutex_t * c_mutex();
> pthread_mutex_t const * c_mutex() const;
>
> That pthread_mutex_t shall be defined in <cthread> (and it shall of
> course also be available through *deprecated* <pthread.h>) and shall
> perform dynamic dispatching for "C-style" code (depending on "C++
> mutex type"). Oder?
Forget that <cthread> for a while, how about sharing your thoughts on the
proposed elimination of the try/timed axis. ;-)
>>> I can't speak for the boost implementation (haven't carefully
>>> studied it), but the Metrowerks implementation also supports
>>> conditions operating on a recursive mutex.
>>
>> Interesting. I presume that this was a deliberate design decision.
>
> It has a precondition "lock.mutex()->locked() && lock.mutex()->
> lock_count() == 1" (or something like that... brrrr, so many "lock"
> things... "guard" would sound much better ;-) )
Does it? I think that the Boost implementation tries to operate "correctly"
for lock_count() > 1, but I may have misread the code.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk