Does anyone know where I can find an implimentation that wraps a std::map
and makes it thread safe? When I say thread safe I mean that it offers only serial access to the map, one thread at a time. Optimally, this map should use only the standard-library and / or boost constructs.
Does not meet the criteria that you have specified, but you could have a look at the TBB containers. There is so called concurrent_hash_map
which allows multiple threads to access concurrently the data in the map. There are some details, but everything is nicely documented and can give you an idea of the "concurrent container". Depending on your needs this might be totally inappropriate...