CancelPrefetch
Document management, Performance, Concurrency
Description
Requests cancellation of a prefetch job started with StartPrefetch
A job that is still queued becomes cancelled at once; a running job stops at its next planning pass or chunk read and then reports the cancelled state
Syntax
Delphi
Function TByteRangeStream.CancelPrefetch(JobHandle: Integer): Boolean;Parameters
| JobHandle | A handle returned by StartPrefetch |
|---|
Return values
| True | The handle identifies a job of this stream and the cancellation request was recorded |
|---|---|
| False | The handle is invalid, or no prefetch job was ever started on this stream |
Remarks
The call does not wait for a running job to stop; use WaitForPrefetch to observe the terminal state
Cancelling a job that already reached a terminal state returns True and leaves that state unchanged
See also
CancelRangeSourcePrefetch, StartRangeSourcePrefetch, GetRangeSourcePrefetchState, WaitForRangeSourcePrefetch