Skip to content

T_CodeJam_Threading_InterlockedOperations

Andrew Koryavchenko edited this page Jun 17, 2018 · 9 revisions

InterlockedOperations Class

Provides a helper class for initializing a values in a thread-safe manner.

Inheritance Hierarchy

System.Object
  CodeJam.Threading.InterlockedOperations
Namespace: CodeJam.Threading
Assembly: CodeJam (in CodeJam.dll) Version: 2.1.0.0

Syntax

C#

public static class InterlockedOperations

VB

Public NotInheritable Class InterlockedOperations

F#

[<AbstractClassAttribute>]
[<SealedAttribute>]
type InterlockedOperations =  class end

Methods

 

Name Description
Public methodStatic member Initialize(Double, Double) Initialize the value referenced by target in a thread-safe manner. The value is changed to value only if the current value is default(double).
Public methodStatic member Initialize(Int32, Int32) Initialize the value referenced by target in a thread-safe manner. The value is changed to value only if the current value is default(int).
Public methodStatic member Initialize(Int64, Int64) Initialize the value referenced by target in a thread-safe manner. The value is changed to value only if the current value is default(long).
Public methodStatic member Initialize(Single, Single) Initialize the value referenced by target in a thread-safe manner. The value is changed to value only if the current value is default(float).
Public methodStatic member Initialize(Double, Double, Double) Initialize the value referenced by target in a thread-safe manner. The value is changed to initializedValue only if the current value is uninitializedValue.
Public methodStatic member Initialize(Int32, Int32, Int32) Initialize the value referenced by target in a thread-safe manner. The value is changed to initializedValue only if the current value is uninitializedValue.
Public methodStatic member Initialize(Int64, Int64, Int64) Initialize the value referenced by target in a thread-safe manner. The value is changed to initializedValue only if the current value is uninitializedValue.
Public methodStatic member Initialize(Single, Single, Single) Initialize the value referenced by target in a thread-safe manner. The value is changed to initializedValue only if the current value is uninitializedValue.
Public methodStatic member Initialize(T)(T, T) Initialize the value referenced by target in a thread-safe manner. The value is changed to value only if the current value is default(T).
Public methodStatic member Initialize(T)(T, T, T) Initialize the value referenced by target in a thread-safe manner. The value is changed to initializedValue only if the current value is uninitializedValue.
Public methodStatic member Update(Double, Func(Double, Double)) Implements lock-free update pattern implementation based on compare-and-swap loop
Public methodStatic member Update(Int32, Func(Int32, Int32)) Implements lock-free update pattern implementation based on compare-and-swap loop
Public methodStatic member Update(Int64, Func(Int64, Int64)) Implements lock-free update pattern implementation based on compare-and-swap loop
Public methodStatic member Update(Single, Func(Single, Single)) Implements lock-free update pattern implementation based on compare-and-swap loop
Public methodStatic member Update(Double, Double, Func(Double, Double, Double)) Implements lock-free update pattern implementation based on compare-and-swap loop
Public methodStatic member Update(Int32, Int32, Func(Int32, Int32, Int32)) Implements lock-free update pattern implementation based on compare-and-swap loop
Public methodStatic member Update(Int64, Int64, Func(Int64, Int64, Int64)) Implements lock-free update pattern implementation based on compare-and-swap loop
Public methodStatic member Update(Single, Single, Func(Single, Single, Single)) Implements lock-free update pattern implementation based on compare-and-swap loop
Public methodStatic member Update(T)(T, Func(T, T)) Implements lock-free update pattern implementation based on compare-and-swap loop
Public methodStatic member Update(T)(T, T, Func(T, T, T)) Implements lock-free update pattern implementation based on compare-and-swap loop
  Back to Top

See Also

Reference

CodeJam.Threading Namespace

Clone this wiki locally