Cancellation class

Cancellation class

Represents an object for requesting cancellation of an operation.

Learn more

The Cancellation type exposes the following members:

Constructors

Constructor Description
init Initializes a new instance of the Cancellation class.

Methods

Method Description
cancel Requests cancellation of the ongoing operation.
cancel_after Makes a request for cancellation after the expiration of the specified number of milliseconds.

Properties

Property Description
is_cancelled The property indicates whether cancellation has been requested.

Example

from groupdocs.search.common import Cancellation

# Create a cancellation object that will cancel after 10 seconds (10000 ms)
cancellation = Cancellation()
cancellation.cancel_after(10000)

See Also