Boost logo

Boost Users :

From: giltayar (gil_at_[hidden])
Date: 2002-05-12 07:24:06


>From boost:thread documentation, it is clear that deleting a thread
does not kill the thread. I very much approve of this. killing a
thread is a very "strong" operation.

The problem is that there is now no connection between the system
thread and the object itself, which (debatably) kills the idiom in
C++ connection the object and the resource (I never remember its
name).

Was the idea of doing a "join()" in the dtor brought up? I.e., the
dtor waiting for the thread to finish? I used it in my library, and
it was _very_ effective, as I could _know_ that the thread and the
object have parallel lifetimes, and it also helped me because it
prevented many "thread-leakage" problems.

Gil

P.S. The question was - "Was the idea of doing a join() in the dtor
ever brought up?"


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