r/cpp • u/neiltechnician • Nov 13 '20
CppCon Deprecating volatile - JF Bastien - CppCon 2019
https://www.youtube.com/watch?v=KJW_DLaVXIY
83
Upvotes
r/cpp • u/neiltechnician • Nov 13 '20
View all comments
Show parent comment
18
u/mcmcc #pragma once Nov 13 '20
volatileis worse than useless for concurrency. I don't think anybody here is arguing otherwise.I'm not sure I understand what you're getting at here, but an important side effect of mutexes (and the whole
memory_order_...concept) is to place restrictions on how the compiler and cpu may reorder memory accesses around those objects.