
On 10/7/09, David M. Cotter <me@davecotter.com> wrote:
how can i do this with boost::thread ?
A condition variable doesn't have state. If you call wait, you will always block until another thread calls notify_one or notify_all. notify_one and notify_all have no effect if no threads are waiting.
well that completely explains it :)
thanks. i've added that state to my class and now it's working great. thanks again!
If boost threads doesn't have a semaphore, we could add one. Is the mac one a counting semaphore? Or just a single, like windows 'events'? We could add both actually. The manual reset, preset/passthru, etc properties come in handy at times. They can of course be implemented by the client on top of what is already there, but if it is common and useful, it could be part of the lib. A library level impl could also make better use of OS level support. Tony