ISynchronizedOperation Interface

Represents an operation that cannot run while it is already in progress.

Definition

Namespace: Gemstone.Threading.SynchronizedOperations
Assembly: Gemstone.Threading (in Gemstone.Threading.dll) Version: 1.0.110 -- Release Build+13c244059615c58a533059438f38d7e59ef0c2ea
public interface ISynchronizedOperation

Properties

CancellationToken Gets or sets CancellationToken to use for canceling actions.
IsPending Gets flag indicating if the synchronized operation has an additional operation that is pending execution after the currently running action has completed.
IsRunning Gets flag indicating if the synchronized operation is currently executing its action.

Methods

Run Executes the action on current thread or marks the operation as pending if the operation is already running.
RunAsync Executes the action on another thread or marks the operation as pending if the operation is already running.
TryRun Attempts to execute the action on current thread. Does nothing if the operation is already running.
TryRunAsync Attempts to execute the action on another thread. Does nothing if the operation is already running.

See Also