Boost logo

Boost :

Subject: [boost] Boost sprint: #3407 boost::call_once not re-entrant (at least in win32)
From: Vicente Botet Escriba (vicente.botet_at_[hidden])
Date: 2009-11-22 11:49:39


I have changed the ticket from threads to thread

As this works as expected, Anthony could just add on the documentation why
reentrant call_once functions are not a good idea. The explanation of Steven
could be a good starting point:

"I'll also point out that there is no good behavior for a recursive call to
call_once. If it calls the function again, then f will be called twice. If
it does not, then whatever initialization that call_once is doing may be
incomplete. In either case, you have to know whether a call can be recursive
and carefully design for it. If it happens accidentally, you're probably
toast regardless of how it behaves. In the face of recursive calls it is
impossible to maintain the post-condition that the function has run exactly

After this modification IMO the ticket can be closed.


View this message in context:
Sent from the Boost - Dev mailing list archive at

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