|
Boost Users : |
Subject: Re: [Boost-users] interprocess_condition::wait(scoped_lock<interprocess_upgradable_lock> &) missing
From: Ion Gaztañaga (igaztanaga_at_[hidden])
Date: 2011-02-03 19:32:22
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 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