|
Boost Users : |
From: Peter Dimov (pdimov_at_[hidden])
Date: 2007-08-10 16:08:02
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();
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