RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TThreadList Class

TThreadList represents a thread-safe list.

Pascal
TThreadList = class;
C++
class TThreadList;

Classes

A TThreadList object is a thread-safe list. Each TThreadList maintains a private TList (a list of pointers to objects). You can add or remove items in a TThreadList from multiple threads without explicit locks. 

To access the actual TList object managed by the thread list, first lock the list by calling the LockList method. Unlock the list by calling the Unlock method when done.

Tip: By default, TThreadList ignores attempts to add duplicate entries to the list. If the list is large, this default is computationally expensive. For better performance, you may want to change the Duplicates property to dupAccept where possible.
 

 

TList 

Working with Lists 

Locking Objects 

Using the Main VCL

Copyright(C) 2008 CodeGear(TM). All Rights Reserved.
What do you think about this topic? Send feedback!