3 ms·
Practically speaking, 'volatile' has used for that pretty much since its inception.
by fragmede 12y ago
Practically speaking, 'volatile' has used for that pretty much since its inception.
- TheLoneWolfling 12y agoYep, even though it really shouldn't be. Volatile has... problems. It was meant more for mem-mapped IO than thread safety. And it's too powerful at the same time, as in there are a number of optimizations that are safe in the typical use cases of volatile that cannot be done to volatile variables.