WaitForPrefetch
Gestione dei documenti, prestazioni, concorrenza
Descrizione
Blocca finché un job di prefetch raggiunge uno stato terminale o scade il timeout, e restituisce quello stato
Sintassi
Delphi
Function TByteRangeStream.WaitForPrefetch(JobHandle: Integer; TimeoutMS: Cardinal): Integer;Parametri
| JobHandle | Un handle restituito da StartPrefetch |
|---|---|
| TimeoutMS | Il tempo massimo di attesa in millisecondi; INFINITE attende finché il job raggiunge uno stato terminale |
Valori restituiti
| 3 | PLNET_PREFETCH_STATE_COMPLETED |
|---|---|
| 4 | PLNET_PREFETCH_STATE_CANCELLED |
| 5 | PLNET_PREFETCH_STATE_FAILED |
| 6 | PLNET_PREFETCH_STATE_LIMIT_REACHED |
| 0 | Il timeout è scaduto, l'handle non è valido oppure su questo stream non è mai stato avviato alcun job di prefetch |
Note
Se il job è già in uno stato terminale, la chiamata ritorna immediatamente
GetPrefetchState riporta lo stato, compresi queued e running, senza attendere
Vedere anche
WaitForRangeSourcePrefetch, GetRangeSourcePrefetchState, StartRangeSourcePrefetch