There was an error while loading. Please reload this page.
Implements lock-free update pattern implementation based on compare-and-swap loop
Namespace: CodeJam.ThreadingAssembly: CodeJam (in CodeJam.dll) Version: 2.1.0.0
C#
public static T Update<T>( ref T value, T newValue, Func<T, T, T> updateCallback ) where T : class
VB
Public Shared Function Update(Of T As Class) ( ByRef value As T, newValue As T, updateCallback As Func(Of T, T, T) ) As T
F#
static member Update : value : 'T byref * newValue : 'T * updateCallback : Func<'T, 'T, 'T> -> 'T when 'T : not struct
1(
0,System.Func{
0,
Type: TNew value.
Uses the same approach that used by c# compiler in event subscription methods
InterlockedOperations ClassUpdate OverloadCodeJam.Threading Namespace