Boost logo

Boost :

From: Alexander Terekhov (terekhov_at_[hidden])
Date: 2001-08-02 07:06:03


> > also, named mutex
> > need to be associated with &once (once control variable).
>
> No, it doesn't "need" to be. With it not being associated with &once
> it's just a "global" mutex. Every call to run_once() will use the
> same conceptual mutex (I say conceptual since the named mutex may or
> may not still actually exist in a call, so may or may not be
> created). The Kernel will handle all synch issues of the creation
> here.

one "global" mutex would result in rather excessive synchronization
(it could hurt; especially at system IPL time) perhaps i was not
clear enough.. it does need association with running process (pid)
to avoid creation of interprocess bottleneck; it does need association
with once control variable (address) to avoid creation of intraprocess
bottleneck.

"Two or more processes can call CreateMutex to create the same
 named mutex. The first process actually creates the mutex,
 and subsequent processes open a handle to the existing mutex."

>>the idea is to build the name at runtime which would
>>include process id and address of once control variable.

regards,
alexander.


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