Internet Direct (Indy)
Home
PreviousUpNext
GThreadCount Variable

Indicates the number threads created by the Indy library.

Pascal
GThreadCount: TIdThreadSafeInteger = nil;

GThreadCount is a TIdThreadSafeInteger variable that represents the global count of TIdThread instances created for the application using the Indy library. 

Resources are allocated to the GThreadCount variable during initialization of the unit that contains the declaration (IdThread.pas). GThreadCount is freed when the unit is finalized. 

GThreadCount is updated when TIdThread instances are created or freed in the application. Creating a TTIdThread instance causes the value in GThreadCount to be incremented. Calling Destroy for the TIdThread instance causes the value in GThreadCount to be decremented. 

GThreadCount is used in TIdThread.WaitAllThreadsTerminated to determine when all executing or suspended TIdThread instances have been terminated.

TIdThreadSafeInteger 

TIdThread.Create 

TIdThread.Destroy 

TIdThread.WaitAllThreadsTerminated

Internet Direct (Indy) version 10.1.5
Copyright © 1993-2006, Chad Z. Hower (aka Kudzu) and the Indy Pit Crew. All rights reserved.
Website http://www.indyproject.org.
Post feedback to the Indy Documentation newsgroup.