System.SyncObjs.TSpinWait

提供: RAD Studio API Documentation
移動先: 案内検索

Delphi

TSpinWait = record

C++

struct DECLSPEC_DRECORD TSpinWait
{
private:
    static const System::Int8 YieldThreshold = System::Int8(0xa);
    static const System::Int8 Sleep1Threshold = System::Int8(0x14);
    static const System::Int8 Sleep0Threshold = System::Int8(0x5);
    int FCount;
    bool __fastcall GetNextSpinCycleWillYield();
public:
    void __fastcall Reset();
    void __fastcall SpinCycle();
    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 */;
    __property int Count = {read=FCount};
    __property bool NextSpinCycleWillYield = {read=GetNextSpinCycleWillYield};
};

プロパティ

種類 可視性 ソース ユニット
record
struct
public
System.SyncObjs.pas
System.SyncObjs.hpp
System.SyncObjs System.SyncObjs

説明

TSpinWait のインスタンスを使用すると、数スピン サイクルの間、現在のスレッドを待機させることができます。

TSpinWait レコードを使用して、数スピン サイクルの間、スレッドを待機させることができます。 TThread.Sleep メソッドとは違って、現在のスレッドで、TSpinWait が現在のプロセッサ時間のスライスを明け渡すことはありません。

関連項目

コード例