Internet Direct (Indy) Version 9.0.1 Beta
IsCurrentThread
Indicates if the thread is the current thread of execution.

function IsCurrentThread(AThread: TThread): boolean;
Parameters
AThread: TThread
Thread to be examined.

Returns
Boolean - True if the thread in AThread is the current thread of execution.

Description
IsCurrentThread is a Boolean function that identifies if the thread in AThread is the current thread of execution in a multithreaded application.

IsCurrentThread isolates the Indy developer for the platform-specific calls needed to identify the current thread of execution in the application. For WIN32, this call is GetCurrentThreadID.

IsCurrentThread compares the ThreadID for AThread to the value returned by GetCurrentThreadID to determine its return value.

IsCurrentThread is used by TIdThreadMgr descendants, TIdThreadMgrDefault and TIdThreadMgrPool, to implement ReleaseThread functionality.