
19 Mar
2010
19 Mar
'10
1:43 a.m.
El 18/03/2010 16:55, Andy Wiese escribió:
Many processes will both read and write this index map. Do the interprocess:: containers provide the needed synchronization, or do I need other synchronization mechanisms?
You need to provide them. Interprocess memory allocation (via construct<>, or allocate(), or through allocators) is thread-safe, just like ::new is thread safe for inter-thread programming. But similarly to inter-thread programming interprocess::map offers the same guarantees as std::map, because interprocess containers are standard-conforming containers: you must provide your own synchronization if you use the same object by two processes-theads and one is inserting or erasing elements. Best, Ion