-
Notifications
You must be signed in to change notification settings - Fork 35
M_CodeJam_Threading_InterlockedOperations_Update__1_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,
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
- value
- Type: T
Value to change. - newValue
- Type: T
Precalculated new value. - updateCallback
- Type: System.Func(T, T, T)
Function to calculate new value.
- T
- [Missing documentation for "M:CodeJam.Threading.InterlockedOperations.Update
1(
0@,0,System.Func{
0,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