Boost logo

Boost Users :

From: Gottlob Frege (gottlobfrege_at_[hidden])
Date: 2005-09-08 21:38:33


>
> Date: Thu, 8 Sep 2005 21:06:12 +0200
> From: "Johan 't Hart" <jopie64_at_[hidden]>
> Subject: Re: [Boost-users] Thread events
> To: <boost-users_at_[hidden]>
> Message-ID: <BAY109-DAV27468EBFC3012D63D9A99B4990_at_phx.gbl>
> Content-Type: text/plain; format=flowed; charset="iso-8859-1";
> reply-type=original
>
> Thanks for your replies.
>
> To me boost::condition looks very much like the old event variable, except
> that it works together with a mutex. I am now wondering why you should
> lock
> a mutex before waiting for the condition? Is there a rationale about this?
>
> Johan

Also note that the wait() on the condition unlocks the mutex until you
return from the wait call. That's not always obvious from the examples.



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