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

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

File
function IsCurrentThread(
    AThread: TIdNativeThread
): boolean;
Parameters 
Description 
AThread 
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. 

GetCurrentThreadID 

MainThreadID

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