Boost logo

Boost Users :

From: Russell Hind (yg-boost-users_at_[hidden])
Date: 2003-06-05 02:55:34


Anders Hybertz wrote:
> ~Test()
> {
> std::cout << "Test::~Test" << std::endl;
> }

I may be missing something here, but can't you simply do a
'thread.join()' (if you are using boost threads) as the first line of
the destructor to wait for the thread to finish.

If not, we implemented something similar in win32 using (dare it say it)
an event. The even was reset at construction time. When the thread
exited, it set the event and the destructor waits for the event.

HTH

Russell


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