Subj : Re: A question about atomic_ptr To : comp.programming.threads From : Chris Thomasson Date : Sun Apr 10 2005 08:52 pm > I was thinking DWCAS or mutex pool... I'm new to these lock-free things. I would go for a strict pthread solution "first"; Quickly address the portability factor. I guess you could simply hash the address of a shared_ptr reference count into an index of an array of pthread_mutex_t's. There is a simple solution for this: http://msdn.microsoft.com/msdnmag/issues/01/08/Concur/ You can take advantage of the fact that the mutex table would be never be destroyed. DWCAS solutions will work fine, just remember that once you use DWCAS with pointers you fall into the portability trap. Most 64-bit processors do not have DWCAS. > Need to read about SMR, I guess. SMR needs a rather extensive underlying support system in order to be useful. You need to heavily optimize the allocation scheme that provides the nodes you use for your collections and/or reference counts. Some key SMR API's need to be coded in assembly language; they are too sensitive to an over aggressive optimizing compiler. Also, you need to examine the method in which SMR utilizes Thread-Local-Storage. My AppCore library has an efficient hazard pointer scheme that you might want to take a quick look at. Any questions are welcome... .