|
Boost :
|
- Next message: Howard Hinnant: "Re: [boost] [thread] RFC standard proposed mutex, read-write mutex, condition"
- Previous message: Yuval Ronen: "Re: [boost] [thread] RFC standard proposed mutex, read-write mutex, condition"
- In reply to: Yuval Ronen: "Re: [boost] [thread] RFC standard proposed mutex, read-write mutex, condition"
- Next in thread: Yuval Ronen: "Re: [boost] [thread] RFC standard proposed mutex, read-write mutex, condition"
- Reply: Yuval Ronen: "Re: [boost] [thread] RFC standard proposed mutex, read-write mutex, condition"
Yuval Ronen:
> Peter Dimov wrote:
>> Yuval Ronen:
>>
>>> Checking in runtime is enough, IMO.
>>
>> How do you suggest this runtime checking be implemented?
>
> assert(m_mutex.locked());
Well... this implies that a condition is always associated with a mutex and
that the Mutex concept provides a locked() query, which it currently does
not.
In principle one may check for a try_lock failure, although this doesn't
tell us which thread has locked the mutex.
Given that you already have a lock variable at the point you are calling
wait, what's wrong with just passing it?
- Next message: Howard Hinnant: "Re: [boost] [thread] RFC standard proposed mutex, read-write mutex, condition"
- Previous message: Yuval Ronen: "Re: [boost] [thread] RFC standard proposed mutex, read-write mutex, condition"
- In reply to: Yuval Ronen: "Re: [boost] [thread] RFC standard proposed mutex, read-write mutex, condition"
- Next in thread: Yuval Ronen: "Re: [boost] [thread] RFC standard proposed mutex, read-write mutex, condition"
- Reply: Yuval Ronen: "Re: [boost] [thread] RFC standard proposed mutex, read-write mutex, condition"
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk