-
Notifications
You must be signed in to change notification settings - Fork 36
M_CodeJam_Threading_InterlockedOperations_Update__1
Andrew Koryavchenko edited this page Jun 17, 2018
·
6 revisions
Implements lock-free update pattern implementation based on compare-and-swap loop
Namespace: CodeJam.Threading
Assembly: CodeJam (in CodeJam.dll) Version: 2.1.0.0
C#
public static T Update<T>(
ref T value,
Func<T, T> updateCallback
)
where T : class
VB
Public Shared Function Update(Of T As Class) (
ByRef value As T,
updateCallback As Func(Of T, T)
) As T
F#
static member Update :
value : 'T byref *
updateCallback : Func<'T, 'T> -> 'T when 'T : not struct
- value
- Type: T
Value to change. - updateCallback
- Type: System.Func(T, T)
Function to calculate new value.
- T
- [Missing documentation for "M:CodeJam.Threading.InterlockedOperations.Update
1(
0@,System.Func{0,
0})"]
Type: T
New value.
Uses the same approach that used by c# compiler in event subscription methods
InterlockedOperations Class
Update Overload
CodeJam.Threading Namespace