SharedCounter class

A thread-safe counter that can be shared in-memory by actors.

public class SharedCounter

Public Members

name description
static Create(…) Creates a new shared counter.
virtual Add(…) Adds a value to the counter atomically.
virtual CompareExchange(…) Sets the counter to a value atomically if it is equal to a given value.
virtual Decrement() Decrements the shared counter.
virtual Exchange(…) Sets the counter to a value atomically.
virtual GetValue() Gets the current value of the shared counter.
virtual Increment() Increments the shared counter.

Remarks

See also Sharing Objects.

See Also