System.Threading.TWorkStealingQueue.TrySteal
Delphi
function TrySteal(out AItem: T; Timeout: Cardinal = 0): Boolean;
C++
bool __fastcall TrySteal(/* out */ T &AItem, unsigned Timeout = (unsigned)(0x0));
Propriétés
Type | Visibilité | Source | Unité | Parent |
---|---|---|---|---|
function | public | System.Threading.pas System.Threading.hpp |
System.Threading | TWorkStealingQueue |
Description
TrySteal récupère les tâches des autres files d'attente de threads lorsque le thread thread-pool a terminé sa propre file d'attente.
Si le délai Timeout
se termine avant que le thread trouve d'autres tâches, TrySteal renvoie False
.