This documentation is archived and is not being maintained.
Provides atomic operations for variables that are shared by multiple threads.
The Interlocked type exposes the following members.
|Add||Overloaded. Adds two integers and replaces the first integer with the sum, as an atomic operation.|
|CompareExchange||Overloaded. Compares two values for equality and, if they are equal, replaces one of the values.|
|Decrement||Overloaded. Decrements a specified variable and stores the result, as an atomic operation.|
|Exchange||Overloaded. Sets a variable to a specified value as an atomic operation.|
|Increment||Overloaded. Increments a specified variable and stores the result, as an atomic operation.|
|Read||Returns a 64-bit value, loaded as an atomic operation.|