Boost logo

Boost :

From: tamari_at_[hidden]
Date: 2001-06-27 07:27:34


From: "Greg Colvin" <gcolvin_at_[hidden]>
> [snip]
>
> I think I like it, but I'm not seeing an easy way to
> create a thread object that goes away when the thread
> exits.
>

Why can't the the last line of the "Run" function do "delete this" &
and the thread class's destructor kill the native thread ?
Also the thread class should enforce heap-only allocation to
prevent attempts to "delete" stack-allocated objects.

I think this method can be used to build Java-like thread objects.

Saul


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk