--- In Boost-Users@yahoogroups.com, Russell Hind
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
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
of thread
exited, it set the event and the destructor waits for the event.
HTH
Russell
I see your point - but if I call thread.join() the program will call thread.join() as soon as the shared_ptr goes out of scope. I want to basically increase the internal counting of the shared_ptr and control it's release. /Anders