System.Classes.TThread.ForceQueue

From RAD Studio API Documentation
Jump to: navigation, search

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 */;

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 the AThread parameter.
  • You can use nil/NULL as the AThread 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.

See Also