Topic Path: Symbol Reference > Classes > TIdThreadSafeCardinal Class
ContentsIndexHome
PreviousUpNext
TIdThreadSafeCardinal Class

Implements a thread-safe Cardinal data type.

File
TIdThreadSafeCardinal = class(TIdThreadSafe);

TIdThreadSafeCardinal is a TIdThreadSafe descendant that implements a thread-safe data type for storing a Cardinal value. TIdThreadSafeCardinal does not rely on "compiler magic" to guarantee that Cardinal operations are atomic, and is Operating System platform independent. 

TIdThreadSafeCardinal relies on the inherited TCriticalSection for resource protection in multi-threaded applications. TIdThreadSafeCardinal implements the Value property for reading or writing the Cardinal value associated with the class instance with resource protection. TIdThreadSafeCardinal also implements methods that protect write access to Value using Increment and Decrement.

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