Hello,
I want to use timed lockable mutex in boost::thread, but the usage is
not so obvious for a beginner.
Would there be anywhere a sample code with this kind og mutex ?
I have a code which works with a boost::mutex in a consumer/producer
queue (code below).
The purpose is to have a maximum waiting delay for waitForNotEmpty().
Thanks.
-------------------------------------------------------------------------
template <typename T>
class MTBornedQueue
{
public:
....
bool waitForNotEmpty()
{
if (!m_container.empty())
return true;
boost::mutex::scoped_lock lock(m_accessMutex);
m_notEmpty.wait(lock,
boost::bind(&MTBornedQueue