Boost logo

Boost :

From: John Maddock (john_at_[hidden])
Date: 2005-09-13 04:47:05


> How does call_once work? Does it maintain a separate mutex for each
> unique function pointer passed in, or is there only one global mutex
> shared by all calls to call_once? In other words, can call_once(foo,
> flag) block call_once(bar, flag2)?

The mutex is unique to both the calling process and the call_once flag, but
not the function pointer (however there should always be a one to one
correspondence between the once-flag and the function pointer).

Hope this makes sense,

John.


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk