Boost logo

Boost :

From: Peter Dimov (pdimov_at_[hidden])
Date: 2001-06-27 07:03:04

From: "Greg Colvin" <gcolvin_at_[hidden]>

> 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.

Could I venture a guess that there is none?

The 'thread' concept, as currently designed (if I understand it correctly,)
simply cannot be represented by a C++ class well. Its lifetime doesn't
correspond to C++ rules, where usually the creator of an object has explicit
control over the object's lifetime.

Why not use something like

namespace thread
    class id; // or 'desc', if you like

    id create(...);

// etc

Peter Dimov
Multi Media Ltd.

Boost list run by bdawes at, gregod at, cpdaniel at, john at