Boost logo

Boost :

From: Roland Schwarz (roland.schwarz_at_[hidden])
Date: 2004-11-04 06:19:58

Incidentally I found the following, which I think applies to the case:

> ...
> Using A Condition Variable - A Complete Example
> ...
> 3. The mutex itself MUST be a recursive mutex. In order to see why,
look at the
> code of the 'handle_requests_loop' function. You will notice that it
first locks the
> mutex, and afterwards calls the 'get_request' function, which locks
the mutex again.
> If we used a non-recursive mutex, we'd get locked indefinitely in
the mutex locking
> operation of the 'get_request' function.

Don't get me wrong, altough I understand the reasoning of the various
posters, the use
of recursive mutex does not seem to be considered wrong in general.


Boost list run by bdawes at, gregod at, cpdaniel at, john at