Top "Volatile" questions

Volatile is a qualifier used to define a data storage area (object, field, variable, parameter) that "can change on its own", thus disallowing some code generator optimizations.

Does Interlocked.CompareExchange use a memory barrier?

I'm reading Joe Duffy's post about Volatile reads and writes, and timeliness, and i'm trying to understand something about the …

c# multithreading optimization volatile memory-model
Do I need volatile for variables of reference types, too?

We often use volatile to ensure that a condition variable can be visible to every Thread. I see the volatile …

java caching jvm visibility volatile
C++ - What does volatile represent when applied to a method?

If I have a C++ method declaration as follows: class A { public: double getPrice() volatile; }; What does volatile represent here? …

c++ volatile
Are volatile variable 'reads' as fast as normal reads?

I know that writing to a volatile variable flushes it from the memory of all the cpus, however I want …

java performance multithreading volatile