Was double-checked locking ever actually broken?

hard~20 min#c++#concurrency#memory-model#singleton

Double-checked locking was for years described as a broken idiom in C++. Explain precisely what was broken about it, what changed in C++11, and what you would write today.

Solution — locked

Sign in to unlock this one

The solution opens once you explain the idea in your own words and it passes the grader — which needs an account to record. Signing in is free.

Log in