Boost Users :
Subject: Re: [Boost-users] boost::unordered_map thread safety
From: Daniel Krügler (dsp_at_[hidden])
Date: 2008-11-11 04:34:15
Jonathan Franklin wrote:
> On Mon, Nov 10, 2008 at 2:43 PM, Kenny Riddile <kfriddile_at_[hidden]
> <mailto:kfriddile_at_[hidden]>> wrote:
> I could be wrong, but I don't think the standard says anything about
> the thread safety of STL containers, so it's implementation-specific.
> The standard says nothing of thread safety. However, 126.96.36.199
> <http://188.8.131.52> says "Which of the functions in the C++ Standard
> Library are not reentrant subroutines is implementation-defined." So at
> least wrt reentrancy it's implementation defined.
In the context of unordered containers it seems appropriate to consider
the direction the standard is going. The most recent draft N2798 has
updated some parts of the library introduction to take care of this.
In 184.108.40.206 [res.on.objects] we have:
"The behavior of a program is undefined if calls to standard library
functions from different threads may introduce a data race. The
conditions under which this may occur are specified in 220.127.116.11."
and in 18.104.22.168 [res.on.data.races] we find several added/updated
paragraphs. Please read details in:
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