Subj : Re: C++ and lock-free To : comp.programming.threads From : Sean Kelly Date : Fri Sep 16 2005 04:22 pm Joe Seigh wrote: > If C++0x ever gets out of being stuck in an infinite loop on > the memory model, where does anyone think C++ is going on > lock-free, the stuff Herb Sutter keeps mentioning but I've > never seen any specific examples except for some simplistic > under the covers COW stuff for string which usually devolves > into discussions about bad design decisions of Std::String? Difficult to say. It's clear that they want to avoid changing the language syntax if at all possible, and also to avoid defining an overly restrictive memory model. But this appears to leave few options for lock-free programming (I'll admit I was half hoping that something akin to Alex's atomic<> stuff would make it in, but I suppose this is still possible). It seems clear that at the very least, we will be given a CAS operation, so worst-case I suppose this may serve as a bi-directional fence as well. For those who don't know, much of what has been discussed so far is linked from here: http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2005/n1815.html > More importantly, since the trend in computing is to patent > everything new, and since C++ relies rather heavily on libraries, > meaning a lock-free version of STL and Boost will have to be > done at some point, what do they think they're going to use > to write these new lock-free libraries with? I don't think they've gotten this far yet. I'm far from an expert on patent law however. I don't suppose any of the patents might be successfully challenged? > Of course, given that patents will only last for 20 years or so, > at the rate they're going, maybe things will work out. :) The next standard will be finalized (and published, I assume) before 2010, which is a tad shy of the twenty year mark :) Sean .