Boost logo

Boost :

From: Philippe A. Bouchard (philippeb_at_[hidden])
Date: 2003-06-30 11:45:43


William E. Kempf wrote:
> Philippe A. Bouchard said:
>> Hi there,
>>
>> I was wondering if you were planning to implement some static
>> thread &
>> thread::current() that returns the current thread id (& thread).
>> That would be really useful.
>
> Can't be done with the current non-copyable semantics. (BTW, I'm
> assuming you know this functionality still exists, via the default
> c-tor.) The next release is changing this, though. What I'm
> contemplating as the best design is a thread::current() as you
> suggest, with the default c-tor creating a "null" thread... but that
> will break existing code, so I have to tread lightly here.

In Brave New World it would be great to derive from boost::thread to easily
append some member variables. Matching thread & thread::curent() with the
appropriate instance of the current thread also (maybe some static
thread::main could be added to match the initial thread).

My 0,02$

Philippe A. Bouchard


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