Boost logo

Boost Users :

From: Ion Gaztañaga (igaztanaga_at_[hidden])
Date: 2006-04-26 14:26:26


Hi Jan,

> Another question! The shared memory library is great Ion Gaztañaga and
> others have created outstanding work.
>
> Is a shmem container thread safe, I am assuming not but just wanted to
> check.

Is not thread-safe. Is exactly as thread safe as a normal STL container
shared between threads. Only object construction (construction/find,)
and memory allocation is thread-safe. Shmem containers are STL compliant
containers capable of using advanced allocators.

So if you want to insert objects in a containers from two
process/threads, you need to hold a mutex first.

Regards,

Ion


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net