Effective Concurrency column a couple of weeks earlier than usual. You can find it here: DDJ posted the nextcolumn a couple of weeks earlier than usual. You can find it here: “Lock-Free Code: A False Sense of Security” , just went live on DDJ’s site, and also appears in the print magazine.

This is a special column in a way, because I rarely critique someone else’s published code. However, mere weeks ago DDJ itself published an article with fundamentally broken code that tried to show how to write a simplified lock-free queue. I corresponded with the author, Petru Marginean, and his main reviewer, Andrei Alexandrescu, to discuss the problems, and they have patched the code somewhat and added a disclaimer to the article. But the issues need to be addressed, and so Petru kindly let me vivisect his code in public in this column (and the next, not yet available, which will show how to do it right).

From the article:

[Lock-free code is] hard even for experts. It’s easy to write lock-free code that appears to work, but it’s very difficult to write lock-free code that is correct and performs well. Even good magazines and refereed journals have published a substantial amount of lock-free code that was actually broken in subtle ways and needed correction. To illustrate, let’s dissect some peer-reviewed lock-free code that was published here in DDJ just two months ago …

Finally, here are links to previous Effective Concurrency columns (based on the magazine print issue dates):