Gemstone Common Library
Show/Hide TOC

# LongSynchronizedOperation(ActionCancellationToken, ActionException) Constructor

Creates a new instance of the LongSynchronizedOperation class.

## Definition

Namespace: Gemstone.Threading.SynchronizedOperations
Assembly: Gemstone.Common (in Gemstone.Common.dll) Version: 1.0.159 -- Release Build+a612c25bc0e1c87e5766544ec4650d2ebcfddcf4
C#
View Source Request Example

    public LongSynchronizedOperation(
    	Action<CancellationToken> action,
    	Action<Exception>? exceptionAction
    )

VB
View Source Request Example

    Public Sub New (
    	action As Action(Of CancellationToken),
    	exceptionAction As Action(Of Exception)
    )

C++
View Source Request Example

    public:
    LongSynchronizedOperation(
    	Action<CancellationToken>^ action,
    	Action<Exception^>^ exceptionAction
    )

JavaScript
View Source Request Example

    Gemstone.Threading.SynchronizedOperations.LongSynchronizedOperation = function(action, exceptionAction);

#### Parameters

action Action CancellationToken
  The action to be performed during this operation.
exceptionAction Action Exception
  The cancellable action to be performed if an exception is thrown from the action.

## Remarks

Cancellable synchronized operation is useful in cases where actions should be terminated during dispose and/or shutdown operations.

## See Also

#### Reference

LongSynchronizedOperation Class
LongSynchronizedOperation Overload
Gemstone.Threading.SynchronizedOperations Namespace