Internet Direct (Indy)
Home
PreviousUpNext
TIdThreadSafeStringList Class

Implements a thread-safe string list data type.

Pascal
TIdThreadSafeStringList = class(TIdThreadSafe);

TIdThreadSafeStringList is a TIdThreadSafe descendant that implements a thread-safe data type for storing TIdStringList values. 

TIdThreadSafeStringList relies on TIdCriticalSection for resource protection in multi-threaded applications. 

TIdThreadSafeStringList implements procedures and functions that provides read and write access to the values in the internal TIdStringList using resource protection. 

Use Lock to acquire a protected copy of the resource-protected TIdStringList, and Unlock to release the resource-protected value. Access to values in the instance are blocked to other threads until Unlock is called. 

Use Add or AddObject to add a new value (and optional associated object) to the resource-protected TIdStringList

Use ObjectByItem to retrieve an Object in the resource-protected TIdStringList using the associated String value. 

Use Clear to remove all values in the thread-safe data type. 

Use Remove to locate and delete a value in the resource-protected dat type using the associated String value.

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.