TThreadManager

Thread manager record.

Declaration

Source position: threadh.inc line 71

Type
TThreadManager = record
public
  InitManager : function : Boolean;
  DoneManager : function : Boolean;
  BeginThread : TBeginThreadHandler;
  EndThread : TEndThreadHandler;
  SuspendThread : TThreadHandler;
  ResumeThread : TThreadHandler;
  KillThread : TThreadHandler;
  CloseThread : TThreadHandler;
  ThreadSwitch : TThreadSwitchHandler;
  WaitForThreadTerminate : TWaitForThreadTerminateHandler;
  ThreadSetPriority : TThreadSetPriorityHandler;
  ThreadGetPriority : TThreadGetPriorityHandler;
  GetCurrentThreadId : TGetCurrentThreadIdHandler;
  SetThreadDebugNameA : TThreadSetThreadDebugNameHandlerA;
  SetThreadDebugNameU : TThreadSetThreadDebugNameHandlerU;
  InitCriticalSection : TCriticalSectionHandler;
  DoneCriticalSection : TCriticalSectionHandler;
  EnterCriticalSection : TCriticalSectionHandler;
  TryEnterCriticalSection : TCriticalSectionHandlerTryEnter;
  LeaveCriticalSection : TCriticalSectionHandler;
  InitThreadVar : TInitThreadVarHandler;
  RelocateThreadVar : TRelocateThreadVarHandler;
  AllocateThreadVars : TAllocateThreadVarsHandler;
  ReleaseThreadVars : TReleaseThreadVarsHandler;
  BasicEventCreate : TBasicEventCreateHandler;
  BasicEventDestroy : TBasicEventHandler;
  BasicEventResetEvent : TBasicEventHandler;
  BasicEventSetEvent : TBasicEventHandler;
  BasiceventWaitFOr : TBasicEventWaitForHandler;
  RTLEventCreate : TRTLCreateEventHandler;
  RTLEventDestroy : TRTLEventHandler;
  RTLEventSetEvent : TRTLEventHandler;
  RTLEventResetEvent : TRTLEventHandler;
  RTLEventWaitFor : TRTLEventHandler;
  RTLEventWaitForTimeout : TRTLEventHandlerTimeout;
end

Description

TThreadManager is a record that contains all callbacks needed for the thread handling routines of the Free Pascal Run-Time Library. The thread manager can be set by the SetThreadManager procedure, and the current thread manager can be retrieved with the GetThreadManager procedure.

The Windows RTL will set the thread manager automatically to a system thread manager, based on the Windows threading routines. Unix operating systems provide a unit cthreads which implements threads based on the C library POSIX thread routines. It is not included by default, because it would make the system unit dependent on the C library.

For more information about thread programming, see the programmer's guide.

See also

Name Description
GetThreadManager Return the current thread manager
SetThreadManager Set the thread manager, optionally return the current thread manager.
TAllocateThreadVarsHandler Threadvar allocation callback type for TThreadManager .
TBasicEventCreateHandler callback type for creating eventstate in TThreadManager .
TBasicEventHandler Generic callback type for handling eventstate in TThreadManager .
TBasicEventHandler Generic callback type for handling eventstate in TThreadManager .
TBasicEventHandler Generic callback type for handling eventstate in TThreadManager .
TBasicEventWaitForHandler Wait for basic event callback type for TThreadManager .
TBeginThreadHandler Callback for thread start in TThreadManager .
TCriticalSectionHandler Generic callback type for critical section handling in TThreadManager .
TCriticalSectionHandler Generic callback type for critical section handling in TThreadManager .
TCriticalSectionHandler Generic callback type for critical section handling in TThreadManager .
TCriticalSectionHandler Generic callback type for critical section handling in TThreadManager .
TCriticalSectionHandlerTryEnter Function prototype for TryEnterCriticalsection
TEndThreadHandler Callback for thread end in TThreadManager .
TGetCurrentThreadIdHandler Callback type for retrieving thread ID in TThreadManager .
TInitThreadVarHandler Threadvar initialization callback type for TThreadManager .
TReleaseThreadVarsHandler Threadvar release callback type for TThreadManager .
TRelocateThreadVarHandler Threadvar relocalization callback type for TThreadManager .
TRTLCreateEventHandler Callback type for creating a TRTLEvent type in TThreadManager .
TRTLEventHandler Generic TRTLEvent handling type for TThreadManager .
TRTLEventHandler Generic TRTLEvent handling type for TThreadManager .
TRTLEventHandler Generic TRTLEvent handling type for TThreadManager .
TRTLEventHandler Generic TRTLEvent handling type for TThreadManager .
TRTLEventHandlerTimeout TRTLEvent timeout handling type for TThreadManager .
TThreadGetPriorityHandler Callback type for thread priority getting in TThreadManager .
TThreadHandler Generic thread handler callback for TThreadManager .
TThreadHandler Generic thread handler callback for TThreadManager .
TThreadHandler Generic thread handler callback for TThreadManager .
TThreadHandler Generic thread handler callback for TThreadManager .
TThreadSetPriorityHandler Callback type for thread priority setting in TThreadManager .
TThreadSwitchHandler Callback type for thread switch in TThreadManager .
TWaitForThreadTerminateHandler Callback type for thread termination in TThreadManager .