Lock free: the new C++ frontier
February 9, 2011
One of the joys of C++ is the way the state of the art in the language periodically renews itself. I started coding in C++ in 1992 (!?!). I spent a couple of years away in 2001 & 2, and when I came back to C++ in 2003 the generic programming movement led by the likes of Stepanov and Alexandrescu had renewed the language. _1 indeed ! And now it feels like it’s happening again. LMAX put me onto the lock free meme a couple of weeks back. There’s a Herb Sutter article on lock free queues out there, folks on stackoverflow say it’s difficult, Hack the Market has blogged about FastFlow, and there’s a “Boost” lock free lib.
Advertisement
February 9, 2011 at 8:04 pm
The lock free techniques are impressive but I have my doubts about how much of a performance gain you would get from using them. Is contention for locked queues enough of a bottleneck in your application that a lock free queue would make a difference?
I’ve wondered about this in my own case and i don’t know the answer yet.