Consider std::atomic over volatile #104
Labels
enhancement
New feature or request
help wanted
Extra attention is needed
question
Further information is requested
I just happened to notice that a cross-thread flag is declared
volatile
, howevervolatile
doesn't guarantee thread safety.For extra safety, I suggest using
std::atomic
with acquire/release ordering instead.The text was updated successfully, but these errors were encountered: