Internet Direct (Indy) Version 9.0.2 Beta
InMainThread
Indicates if the current thread is the main thread of the application.

function InMainThread: boolean;
Returns
Boolean - True if the current thread is the main thread of execution.

Description
InMainThread is a Boolean function that identifies if the current thread represents the main thread of execution in an application.

InMainThread isolates the Indy developer for the platform-specific calls needed to identify the current thread and the application main thread. For WIN32, these calls are GetCurrentThreadID and MainThreadID.

InMainThread is used by TIdAntiFreeze to implement DoProcess functionality.