
27 Mar
2007
27 Mar
'07
1:45 p.m.
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 harmless.