Boost logo

Boost :

From: Anthony Williams (anthony_w.geo_at_[hidden])
Date: 2007-03-27 09:59:05

Howard Hinnant <hinnant_at_[hidden]> writes:

> On Mar 27, 2007, at 4:21 AM, Anthony Williams wrote:
>> t.detach() t.join() harmless race. Either thread is detached
>> first, so
>> join is no-op, or thread is joined first,
>> so
>> detach is no-op.
> This one has me worried as it seems like such a race is likely to be a
> logical error in the program.

Agreed. It just fell out from having detach, cancel and join be thread-safe. I
agree that it is a bug to try and join and detach the same thread. join/join
is always fine, though.

> This is a departure from pthread semantics that I am uncomfortable
> with. If I accidently get myself into this kind of race. I think I'd
> prefer some noise (an assert, or exception, or crash).

Then we ought to specify the behaviour that we want rather than leaving it


Anthony Williams
Just Software Solutions Ltd -
Registered in England, Company Number 5478976.
Registered Office: 15 Carrallack Mews, St Just, Cornwall, TR19 7UL

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