
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
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@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users