System.Classes.TThread.ForceQueue
Delphi
class procedure ForceQueue(const AThread: TThread; const AMethod: TThreadMethod; ADelay: Integer = 0); overload; static;
class procedure ForceQueue(const AThread: TThread; const AThreadProc: TThreadProcedure; ADelay: Integer = 0); overload; static;
C++
static void __fastcall ForceQueue(TThread* const AThread, const TThreadMethod AMethod, int ADelay = 0x0)/* overload */;
static void __fastcall ForceQueue(TThread* const AThread, const _di_TThreadProcedure AThreadProc, int ADelay = 0x0)/* overload */;
Properties
Type | Visibility | Source | Unit | Parent |
---|---|---|---|---|
procedure function |
public | System.Classes.pas System.Classes.hpp |
System.Classes | TThread |
Description
Queues the execution of a method call within the main thread.
Unlike Queue, the execution of the method call specified by AMethod
is forced to be queued although it is called by the main thread.
AMethod
associates the caller thread:
- For static methods, you can associate the
AMethod
with any thread using theAThread
parameter. - You can use
nil/NULL
as theAThread
parameter if you do not need to know the information of the caller thread in the main thread. - RemoveQueuedEvents uses this thread information to find the proper queued method.