Boost logo

Boost :

Subject: Re: [boost] [interprocess][trunk][windows] named_mutex doesn't work whithin a DLL
From: Ion Gaztañaga (igaztanaga_at_[hidden])
Date: 2010-09-09 15:59:48


The lazy init does not work because somehow get() is being called in a
static object (static_initializer()->init()), so it's lazily but *too
early* instantiated.

If intermodule_singleton is used as a singleton outside static classes
in dlls, then I guess there is no problem.

In the future I'll change intermodule_singleton to use
windows_managed_shared_memory so that we can avoid any call to COM objects.

According to microsoft documentation, we shouldn't even call C runtime
memory management functions in DllMain, which is really frightening. And
in Windows 2000 we can't even create a named pipe or other named object
(so we can't create named shared memory).

If you need an static object to use a intermodule_singleton, then we can
replace the static object with another intermodule_singleton.

Best,

Ion


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