
4 Nov
2004
4 Nov
'04
11:19 a.m.
... 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
If we used a non-recursive mutex, we'd get locked indefinitely in
Incidentally I found the following, which I think applies to the case: http://users.actcom.co.il/~choo/lupg/tutorials/multi-thread/multi-thread.htm... the mutex again. 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. Roland