|
Boost Users : |
Subject: Re: [Boost-users] [unordered] Are unordered containers thread safe?
From: Scott McMurray (me22.ca+boost_at_[hidden])
Date: 2010-03-31 11:35:22
On 31 March 2010 10:59, Ralf Goertz <R_Goertz_at_[hidden]> wrote:
>
> are unordered containers thread safe
>
As a general rule, Boost types are as thread-safe as an int: Accessing
independent objects from independent threads is fine but accessing the
same object from different threads requires mutual exclusion.
I have no reason to believe that the unordered containers are
exceptions. (And making containers internally thread-safe is usually
not a good idea, since external synchronization is often still needed
to maintain a more complex invariant.)
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