Boost logo

Boost Users :

Subject: Re: [Boost-users] boost::recursive_mutex doesn't lock ???
From: Martin Dyring-Andersen (mda_at_[hidden])
Date: 2010-11-03 09:32:10


Chris wrote:

[...]
> but the main thread doesn't stop at
> boost::recursive_mutex::scoped_lock lock(io_mutex);
>
> How should I implement it then? not using recursive_mutex?

I'd go for a barrier or condition variable(s) instead. A mutex is best suited locking/exclusion, not waiting for a condition.

-- 
Best regards,
Martin Dyring-Andersen

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