5 Jun
2003
5 Jun
'03
7:55 a.m.
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