Internet Direct (Indy)
Home
PreviousUpNext
TIdThreadSafe Class

Implements the ancestor for thread-safe data types.

Pascal
TIdThreadSafe = class;

TIdThreadSafe is a TObject descendant that represents the base class for thread-safe data types in Indy applications. TIdThreadSafe uses a protected TCriticalSection to provide resource protection in multi-threaded applications. TIdThreadSafe also implements the Lock and Unlock methods to access the resource protection block for the data type. 

TIdThreadSafe and descendant classes are used as an alternative to ThreadVars which do not allow runtime initialization and assignment using C++ Builder. 

Please note that TIdThreadSafe does not implement a specific data type value, and should not be instantiated in an application. Use one of the descendant classes that realizes a data type, such as TIdThreadSafeInteger, TIdThreadSafeString, or TIdThreadSafeStringList.

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.