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

JobHandleA handle returned by StartPrefetch

Return values

1PLNET_PREFETCH_STATE_QUEUED
2PLNET_PREFETCH_STATE_RUNNING
3PLNET_PREFETCH_STATE_COMPLETED
4PLNET_PREFETCH_STATE_CANCELLED
5PLNET_PREFETCH_STATE_FAILED
6PLNET_PREFETCH_STATE_LIMIT_REACHED
0The 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