Details
Description
New [volatile] AST attribute that adds required custom modifier System.Runtime.CompilerServices.IsVolatile on a field.
Subsequent accesses (load or store) to such fields have IL "volatile." prefix.
Fields that are declared volatile are not subject to compiler optimizations that assume access by a single thread.
This ensures that the most up-to-date value is present in the field at all times.
Read http://msdn.microsoft.com/en-us/library/x13ttww7.aspx for more information.
Usage:
class Test:
[volatile]
public static Value = 42
print Test.Value
Landed in rev. 3279