| InterlockedSpinConditionallySwapT, TReturn Method |
INTERNAL!
Atomically updates the int
reference by calling
updateIfTrue to get the new value.
updateIfTrue returns a Tuple<should update, the new int value, the return value>
If the first item in the tuple is true, the value is updated, and the third value of the tuple is returned.
Note that
updateIfTrue may be called many times so it should be idempotent.
Remarks Note! Part of internal API. Breaking changes may occur without notice. Use at own risk.
Namespace:
Akka.Util.Internal
Assembly:
Akka (in Akka.dll) Version: 1.2.3.42 (1.2.3.42)
Syntax public static TReturn ConditionallySwap<T, TReturn>(
ref T reference,
Func<T, Tuple<bool, T, TReturn>> updateIfTrue
)
where T : class
static member ConditionallySwap :
reference : 'T byref *
updateIfTrue : Func<'T, Tuple<bool, 'T, 'TReturn>> -> 'TReturn when 'T : not struct
Parameters
- reference
- Type: T
TBD - updateIfTrue
- Type: SystemFuncT, TupleBoolean, T, TReturn
TBD
Type Parameters
- T
- TBD
- TReturn
- TBD
Return Value
Type:
TReturnThe third value from the tuple return by
updateIfTrue.
See Also