Boost logo

Boost :

From: Peter Dimov (pdimov_at_[hidden])
Date: 2008-05-28 15:02:28

Howard Hinnant:

> I've used this (for example) in implementing recursive mutexes:
> class recursive_mutex
> {
> unsigned state_;
> std::thread::id id_;

As already pointed out in the thread

linked from #783, this requires thread::id atomicity, which is not
guaranteed. I'm not sure whether instant reuse can also break this
particular example, but it definitely breaks other uses of thread::id.

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