Quick A: std::once_flag
+ std::call_once
.
Double-checked locking in C++11?
From the selected answer ([edit] added):
I suggest forgetting about double-checked locking [by hand]. C++ provides a very useful tool for this kind of situation in the form of
std::call_once
, so use that....
Add a Comment
Comments are closed.