$include_dir="/home/hyper-archives/boost-users/include"; include("$include_dir/msg-header.inc") ?>
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?"