Description: For integer data types of simple operation, members of the Interlocked class can be used to achieve thread synchronization, exist in the System.Threading namespace. Interlocked class has the following methods: Increment, Decrement, Exchange and CompareExchange. You can use the Increment and Decrement integer addition and subtraction of a guarantee as an atomic operation. Exchange method of automatic exchange value of the specified variable. CompareExchange method combines two operations: comparing two values and compare the results according to the third value is stored in one variable. Compare and exchange operation is performed by atomic
To Search:
File list (Check if you may need any files):
C#线程同步的几种方法.pdf