Boost logo

Boost Users :

From: Anders Hybertz (anders.hybertz_at_[hidden])
Date: 2003-06-05 07:24:37


--- In Boost-Users_at_[hidden], Russell Hind <yg-boost-
users_at_m...> wrote:
>
>
> 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

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


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