-
Notifications
You must be signed in to change notification settings - Fork 36
M_CodeJam_Threading_InterlockedOperations_Initialize_4
Andrew Koryavchenko edited this page Jun 17, 2018
·
5 revisions
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).
Namespace: CodeJam.Threading
Assembly: CodeJam (in CodeJam.dll) Version: 2.1.0.0
C#
public static long Initialize(
ref long target,
long value
)
VB
Public Shared Function Initialize (
ByRef target As Long,
value As Long
) As Long
F#
static member Initialize :
target : int64 byref *
value : int64 -> int64
- target
- Type: System.Int64
Reference to the target location. - value
- Type: System.Int64
The value to use if the target is equal to default(long).
Type: Int64
The new value referenced by target. Note that this is nearly always more useful than the usual return from CompareExchange(Int64, Int64, Int64) because it saves another read to target.
InterlockedOperations Class
Initialize Overload
CodeJam.Threading Namespace