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));
Properties
Type | Visibility | Source | Unit | Parent |
---|---|---|---|---|
function | public | System.Threading.pas System.Threading.hpp |
System.Threading | TWorkStealingQueue |
Description
TrySteal takes tasks from other threads queues when the calling thread pool thread finishes its own queue.
If the Timeout
finishes before the thread finds other tasks, TrySteal will return False
.