13 Dec
2004
13 Dec
'04
9:49 a.m.
How about comparing address of thread objects (using the current design)? Will that satisfy your needs?
It would, as long as I have the threads address available from *inside* the thread. But to my understanding boost::thread::thread() does *not* return a globally addressable object.
Yes, you're right. You can't really get a boost::thread form inside the thread. To this end I suggetsed the bool thread::is_current() const; member function which doesn't return a thread object, but assumes the all you need to do with the current thread object is compare it to other threads, so it offers a replacement. But until this is added (or the thread library is completely refactored using other design such as the thread_ref design), this is a problem.