System.SyncObjs.TSpinWait.SpinUntil
Delphi
class procedure SpinUntil(const ACondition: TFunc<Boolean>); overload; static;
class function SpinUntil(const ACondition: TFunc<Boolean>; Timeout: Cardinal): Boolean; overload; static;
class function SpinUntil(const ACondition: TFunc<Boolean>; const Timeout: TTimeSpan): Boolean; overload; static;
C++
static void __fastcall SpinUntil(const System::DelphiInterface<System::Sysutils::TFunc__1<bool> > ACondition)/* overload */;
static bool __fastcall SpinUntil(const System::DelphiInterface<System::Sysutils::TFunc__1<bool> > ACondition, unsigned Timeout)/* overload */;
static bool __fastcall SpinUntil(const System::DelphiInterface<System::Sysutils::TFunc__1<bool> > ACondition, const System::Timespan::TTimeSpan &Timeout)/* overload */;
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 until the specified condition is satisfied or until the specified timeout expires.
There are three overloaded SpinUntil methods. All three have a generic parameter, ACondition, whose type is a Boolean function. The second and the third methods have an additional parameter, Timeout, of LongWord type and TTimeSpan type, respectively.