Boost logo

Boost Users :

Subject: Re: [Boost-users] boost::unordered_map thread safety
From: Daniel James (daniel_james_at_[hidden])
Date: 2008-11-10 13:12:52


2008/11/10 Kenny Riddile <kfriddile_at_[hidden]>:
> This is a simple question, but a quick search didn't turn up any answers.
> Is it safe for multiple readers to access a boost::unordered_map
> concurrently?

Yes, as long as nothing modifies it (and the key and mapped object,
hash function and key predicate are appropriately safe, of course).
This is the same as any STL container.

Daniel


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