Boost logo

Boost Users :

Subject: Re: [Boost-users] interprocess_condition::wait(scoped_lock<interprocess_upgradable_lock> &) missing
From: John Ky (newhoggy_at_[hidden])
Date: 2011-02-03 20:14:25


Hi Ion,

Yes that makes sense.

It would be nice to have a condition_variable_any that supports any kind of
lock.

It's probably okay if there were a condition_variable_* class for each lock
type as well. Or did you mean something like condition_variable_any<Mutex>?

Cheers,

-John

2011/2/4 Ion Gaztañaga <igaztanaga_at_[hidden]>

> El 04/02/2011 1:20, Ion Gaztañaga escribió:
>
> El 04/02/2011 0:59, John Ky escribió:
>>
>>> Hi Ion,
>>>
>>> What do you mean by "a mutex and a condition variable should know each
>>> other".
>>>
>>> In the proposed interprocess_upgradable_mutex implementation, the
>>> condition variable is associated with the underlying interprocess_mutex,
>>> so it should be fine right?
>>>
>>
>> But upgradable mutex could be implemented without using
>> interprocess_mutex, that's an implementation detail. I don't see the
>> need to use an upgradable lock. POSIX does not support condition
>> variables with read-write locks (although I think Windows Vista does) so
>> Interprocess does not offer any support for this.
>>
>
> I think you are trying to support a condition variable that could accept
> any kind of lock. That sounds like condition_variable_any, a class that is
> not implemented in Interprocess yet. The interface of condition_variable
> might suggest that it supports any kind of lock, but it is not true. I think
> I should state clearly this requirement in the documentation and the code
> and maybe try to support condition_variable_any in the future.
>
> Best,
>
>
> Ion
> _______________________________________________
> Boost-users mailing list
> Boost-users_at_[hidden]
> http://lists.boost.org/mailman/listinfo.cgi/boost-users
>



Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net