Boost logo

Boost Users :

Subject: [Boost-users] boost thread query
From: Sean Farrow (sean.farrow_at_[hidden])
Date: 2010-11-24 06:28:30


Hi:
I have two threads that are started by a class created by the applications main thread.
Can the thread function be a private member of that class or does it need to be public?
When the application exits I need the threads to be notified and exit.
What is the best way of handling this? I need this to be cross platform but in windows I would have used a waitforSingleObject and signalled the event when the main thread wants to exit.
Could I use a condition for this, and do a do while loop waiting on the condition to be notified, if I do this do I need a mutex just for the condition?
Any help appreciated.
Cheers
Sean.



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