Boost logo

Boost :

From: williamkempf_at_[hidden]
Date: 2001-07-31 15:05:45

--- In boost_at_y..., williamkempf_at_h... wrote:
> > why not "static thread& thread::current()" ?
> Because this would be difficult to implement. I could manage this
> with TSD but that's a lot of overhead (actual heap allocations
> be needed and clean up stacks used) for little benefit in the
> interface.

Actually, on reflection, even TSD won't work here. The thread object
needs to exist beyond the lifetime of the thread context. There is
no way to safely implement this with a reference return.

Bill Kempf

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