ates that a variable's value may change unpredictably

volatile <Int> var;


The compiler nor CPU are allowed to make assumptions about value consistency or memory ordering semantics. As such, reordering optimizations and caching are disabled. All access to a volatile is surrounded by memory fences as available.

copyright © Brent Lewis 2017