Subj : Re: STL Containers w/ Virtually Zero-Overhead Lock-Free Reads... To : (Usenet) From : David Abrahams Date : Tue Sep 20 2005 11:00 am Maciej Sobczak writes: > Chris Thomasson wrote: > >> Perhaps I should create a demo virtually >> zero-overhead container class... > > Please do, it would be a perfect feasibility study. > > But be careful to implement the existing interface exactly and > completely, especially the guarantees about iterators lifetime and > validity - this will be needed to actually apply some algorithms to it. I could be missing something important, but it seems to me that if you want to "actually apply some algorithms to it" then a lock-free container is of little use, since you get synchronization at the wrong level of granularity. You'd need algorithm-level synchronization, rather than container-level synchronization, in that case. In other words, the SGI argument against putting mutexes in the containers applies just as well to the question of whether lock-free container operations are a good idea. -- Dave Abrahams Boost Consulting www.boost-consulting.com [ See http://www.gotw.ca/resources/clcm.htm for info about ] [ comp.lang.c++.moderated. First time posters: Do this! ] .