System.Classes.TThreadList
Delphi
TThreadList = class
C++
class PASCALIMPLEMENTATION TThreadList : public System::TObject
Properties
Type | Visibility | Source | Unit | Parent |
---|---|---|---|---|
class | public | System.Classes.pas System.Classes.hpp |
System.Classes | System.Classes |
Description
TThreadList represents a thread-safe list.
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 UnlockList 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.