System.Classes.TThread.ForceQueue
Delphi
class procedure ForceQueue(const AThread: TThread; const AMethod: TThreadMethod); overload; static;
class procedure ForceQueue(const AThread: TThread; const AThreadProc: TThreadProcedure); overload; static;
C++
static void __fastcall ForceQueue(TThread* const AThread, const TThreadMethod AMethod)/* overload */;
static void __fastcall ForceQueue(TThread* const AThread, const _di_TThreadProcedure AThreadProc)/* overload */;
プロパティ
種類 | 可視性 | ソース | ユニット | 親 |
---|---|---|---|---|
procedure function |
public | System.Classes.pas System.Classes.hpp |
System.Classes | TThread |
説明
main スレッド内でメソッド呼び出しの実行をキューに入れます。
Queue とは異なり、AMethod
によって指定されるメソッド呼び出しの実行は、main スレッドで呼び出されますが、キューに強制的に入れられます。
AMethod
は、呼び出し側スレッドを関連付けます。
- static メソッドについては、
AThread
パラメータを使用して、AMethod
をどのスレッドにも関連づけられます。 - main スレッド内の呼び出し側スレッドについての情報を知る必要がない場合には、
nil/NULL
をAThread
パラメータに使用することも可能です。 - RemoveQueuedEvents は、このスレッド情報を使用し、適切なキュー メソッドを見つけます。