Mono Class Library: System.Threading.Thread Overview | Members

System.Threading.Thread.VolatileRead Method

Performs a volatile read from the specified address.

public static float VolatileRead (ref float address)

Parameters

address
A reference to a float that specifies the address in memory from which to read.

Returns

A float containing the value at the specified address after any pending writes.

Remarks

The value at the given address is atomically loaded with acquire semantics, meaning that the read is guaranteed to occur prior to any references to memory that occur after the execution of this method in the current thread. It is recommended that Thread.VolatileRead and Thread.VolatileWrite be used in conjunction. Calling this method affects only this single access; other accesses to the same location are required to also be made using this method or Thread.VolatileWrite if the volatile semantics are to be preserved. This method has exactly the same semantics as using the volatile prefix on the load CIL instruction, except that atomicity is provided for all types, not just those 32 bits or smaller in size.
Note: For additional information, see Partition I of the CLI Specification.

Requirements

Namespace: System.Threading
Assembly: mscorlib (in mscorlib.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0