|
Boost Users : |
Subject: Re: [Boost-users] are boost::interprocess containers thread-safe?
From: Ion Gaztañaga (igaztanaga_at_[hidden])
Date: 2009-12-17 15:13:01
El 17/12/2009 15:17, blp330 escribió:
>
> OK, thank you. :)
>
> I am curious about:
>
> 1.
> Does any lock-free containers for boost::interprocess (just like
> boost::lockfree)?
No.
> 2.
> Mutex and any other sync objects does not use native win32 API to implement.
> (It uses file to emulate that, right?)
Process-shared mutexes and condition variables and emulated using atomic
operations and waits.
> Does any performance impact in win32 platform to use locks?
If there is low contention, no. For high contention programs,
spin-and-lock strategies can have a big performance impact.
> Does anything I should notice to use boost::interprocess in win32 platform?
>
> 3.
> I should use lock for containers to implement multiple producer consumer, or
> just simply use message_queue for that?
> any good suggestion or recommend?
It depends on what you need (ordered that by a key, reallocation needs,
etc.) Think about it just like you will think for inter-thread
communications.
best,
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