Topic Path: Symbol Reference > Functions > IsCurrentThread Function
IsCurrentThread Function

Determines if the specified thread is the current thread of execution.

function IsCurrentThread(
    AThread: TIdNativeThread
): boolean;
Thread to compare to the current thread of execution. 

boolean - True when the thread is the current thread of execution.

IsCurrentThread is a boolean function used to determine if the thread specified in AThread is the current thread of execution in the application. IsCurrentThread compares the thread identifiers the specified thread and the current thread, and will return True when they are the same. 

Use InMainThread to determine when the current thread is the main thread execution for the application. 


InMainThread and IsCurrentThread are not defined for the .Net platform. For the .Net platform, use the GetCurrentThreadID and MainThreadID to get thread handles that can used for the comparison. 



Copyright 1993-2006, Chad Z. Hower (aka Kudzu) and the Indy Pit Crew. All rights reserved.
Post feedback to the Indy Docs Newsgroup.