System.Classes.TThread.ForceQueue

From RAD Studio API Documentation
Jump to: navigation, search

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 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