System.SyncObjs.TSpinWait.SpinCycle
Delphi
procedure SpinCycle;
C++
void __fastcall SpinCycle(void);
Properties
| Type | Visibility | Source | Unit | Parent | 
|---|---|---|---|---|
| procedure function | public | System.SyncObjs.pas System.SyncObjs.hpp | System.SyncObjs | TSpinWait | 
Description
Keeps the thread in a busy waiting status.
Call SpinCycle to make the thread wait a number of CPU cycles before it tries to acquire the lock again. After 10 unsuccessful attempts, the thread sleeps for 1 millisecond every modulus 20 cycles, and sleeps for 0 milliseconds every modulus 5 cycles. All other cycles simply yield.