Boost logo

Boost :

From: Peter Dimov (pdimov_at_[hidden])
Date: 2007-03-27 09:45:05

Howard Hinnant wrote:

[ detach vs join ]

> 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).

I'm not entirely sure what is the purpose of detach as it's unique to N2184,
but if it's only used to indicate "do not cancel on ~thread, please", there
is no need for it to actually detach anything (invalidate the pthread_t
handle), just set a "don't cancel" flag. The race you describe is then

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