Boost logo

Boost :

Subject: [boost] [interprocess] (Win32) shared memory totally doesn't work :(
From: David M. Cotter (me_at_[hidden])
Date: 2010-06-14 19:28:21


so in process A i do this:

shared_memory_object obj(create_only, "guid of some kind", read_write);

during the construction of that object, it makes a call to "get_boot_time_str()" to construct a folder name based on the boot time. this makes sense, so process B can locate the SAME folder, cuz the boot time is the same, right?

well, wrong.

you see, the function *says* get_BOOT_time, but it is actually getting boot PLUS SYSTEM (current) time. which is going to be different for the two processes, unless they made the call at the *exact* same time.

so it would seem, unless i'm totally misunderstanding this, that it is impossible to use the shared memory thing as it is implemented.

if i *remove* the part where it relies on SYSTEM time and only let it use BOOT time, everything works as documented and as expected.

what is this about? i'm so curious how other people could be using this?

-dave


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