10 Aug
2007
10 Aug
'07
8:08 p.m.
Sam Lievesley wrote: ...
Worker thread
boost::mutex::scoped_lock lock(m_Mutex); while (IsAlive()) {
// do some work
m_Condition.wait(lock); }
...
Main thread
-- Start a worker thread -- boost::mutex::scoped_lock lock(m_Mutex);
make_IsAlive_return_false();
m_Condition.notify_one();