THPDFCancellationToken Class

Provides a thread-safe one-shot cancellation signal that long-running HotPDF operations observe at stable work boundaries

Declaration

THPDFCancellationToken = class(TObject)
public
  procedure Cancel;
  procedure ThrowIfCancellationRequested(
    const OperationName: AnsiString = 'operation');
  property IsCancellationRequested: Boolean read GetIsCancellationRequested;
end;

Unit

HPDFTypes

Members

NamePurpose
CancelAtomically and permanently requests cancellation
IsCancellationRequestedReads the cancellation state safely from any thread
ThrowIfCancellationRequestedRaises EHPDFOperationCancelled with the supplied operation name when cancelled

Usage notes

Related APIs