Quick Contact

✉
fahimkhan20148@gmail.com
📱
+971 507 286 133
Back to Notes
September 12, 2026
compilermemoryconcurrencyvariables

Volatile Variables

Tells the compiler not to perform read optimisations on a variable, as some other thread or non-obvious code might change the variable's value. The compiler will not cache the value of the variable between reads, because other code might have changed it.