AtomicCounterLongGetAndAdd Method |
Gets the current value of the counter and adds an amount to it.
Namespace: Akka.Util.InternalAssembly: Akka (in Akka.dll) Version: 0.8.0.0 (0.8.0.0)
Syntaxpublic long GetAndAdd(
long amount
)
Public Function GetAndAdd (
amount As Long
) As Long
public:
virtual long long GetAndAdd(
long long amount
) sealed
abstract GetAndAdd :
amount : int64 -> int64
override GetAndAdd :
amount : int64 -> int64
Parameters
- amount
- Type: SystemInt64
The amount to add to the counter.
Return Value
Type:
Int64The original value.
Implements
IAtomicCounterTGetAndAdd(T)
RemarksThis uses a CAS loop as Interlocked.Increment is not atomic for longs on 32bit systems.
See Also