Sign in Join
FPDoc Onlineexperiment

TThreadList class

In unit Classes

Thread-safe list object.

Declaration

pascal
TThreadList = class

Description

TThreadList is a thread-safe Tlist implementation. Unlike TList, it can be accessed read-write by multiple threads: the list implementation will take care of locking the list when adding or removing items from the list.

See also

Properties

DuplicatespublicDescribes what to do with duplicates.

Methods

CreatepublicCreates a new thread-safe list.
DestroypublicDestroys the list instance.
AddpublicAdds an element to the list.
ClearpublicRemoves all elements from the list.
LockListpublicLocks the list for exclusive access.
RemovepublicRemoves an item from the list.
UnlockListpublicUnlocks the list after it was locked.

An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.