Subj : Re: STL Containers w/ Virtually Zero-Overhead Lock-Free Reads... To : (Usenet) From : kanze Date : Tue Sep 20 2005 08:21 am Chris Thomasson wrote: > Should it be done? I'm not sure exactly what you are asking for. Currently, the SGI implementation doesn't require external synchronization if all accesses are non-modifying. Globally, I don't think that they had to do anything special to achieve this. (It does mean that std::string cannot be COW.) If you're asking about lock free read access while someone else is modifying, and only the modifier having a lock, I'm sceptical. A modifying access can generally rearrange memory, changing the addresses of objects, etc. Which in turn invalidates results from read accesses, even in a single thread environment. -- James Kanze GABI Software Conseils en informatique orientée objet/ Beratung in objektorientierter Datenverarbeitung 9 place Sémard, 78210 St.-Cyr-l'École, France, +33 (0)1 30 23 00 34 [ See http://www.gotw.ca/resources/clcm.htm for info about ] [ comp.lang.c++.moderated. First time posters: Do this! ] .