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 18:59:54


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?

Cheers,

-John

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

> El 03/02/2011 2:16, John Ky escribió:
>
> Hi boost users,
>>
>> I've discovered that the following doesn't compile.
>>
>> using namespace boost::interprocess;
>> interprocess_upgradable_mutex mutex;
>> interprocess_condition cv;
>> boost::posix_time::ptime deadline;
>>
>
> Condition variables are only compatible with interprocess_mutex. I think
> they have no sense with other types of locks, because a mutex and a
> condition variable should know each other. In POSIX, condition variables are
> not compatible even with POSIX recursive locks, not to mention user defined
> locking primitives.
>
> 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