GetPrefetchState
Document management, Performance, Concurrency
Description
Returns the current lifecycle state of a prefetch job without waiting
Syntax
Delphi
Function TByteRangeStream.GetPrefetchState(JobHandle: Integer): Integer;Parameters
| JobHandle | A handle returned by StartPrefetch |
|---|
Return values
| 1 | PLNET_PREFETCH_STATE_QUEUED |
|---|---|
| 2 | PLNET_PREFETCH_STATE_RUNNING |
| 3 | PLNET_PREFETCH_STATE_COMPLETED |
| 4 | PLNET_PREFETCH_STATE_CANCELLED |
| 5 | PLNET_PREFETCH_STATE_FAILED |
| 6 | PLNET_PREFETCH_STATE_LIMIT_REACHED |
| 0 | The handle is invalid, or no prefetch job was ever started on this stream |
Remarks
States 3 through 6 are terminal; WaitForPrefetch blocks until one of them is reached
See also
GetRangeSourcePrefetchState, WaitForRangeSourcePrefetch, StartRangeSourcePrefetch