THPDFCancellationToken Class
Provides a thread-safe one-shot cancellation signal that long-running HotPDF operations observe at stable work boundaries
اعلان
THPDFCancellationToken = class(TObject)
public
procedure Cancel;
procedure ThrowIfCancellationRequested(
const OperationName: AnsiString = 'operation');
property IsCancellationRequested: Boolean read GetIsCancellationRequested;
end;
واحد
HPDFTypes
Members
| نام | هدف |
|---|---|
Cancel | Atomically and permanently requests cancellation |
IsCancellationRequested | Reads the cancellation state safely from any thread |
ThrowIfCancellationRequested | Raises EHPDFOperationCancelled with the supplied operation name when cancelled |
یادداشتهای استفاده
- The caller owns the token and must keep it alive for the entire operation or progressive render session
- A token cannot be reset after
Cancel; create a new instance for the next operation - Cancellation is cooperative, so the current content operator, compression step, or operating-system private-key call may finish before the request is observed
EHPDFOperationCancelled.OperationNameidentifies the operation that observed the request