Indy 9 | Content | Index | Reference

TIdThreadSafeList
Hierarchy, Methods, See Also, Unit: IdThreadSafe
Implements a thread-safe List of threads.

    TIdThreadSafeList = class(TThreadList)

Unit
IdThreadSafe
Description
TIdThreadSafeList is a TIdThreadList descendant that implements a thread-safe access to a list of thread instances.

TIdThreadSafeList.IsCountLessThan
TIdThreadSafeList
Indicates if the thread-safe list is smaller than a threshold Value.

    function IsCountLessThan(const AValue: Cardinal): Boolean;

Parameters
const AValue: Cardinal
Numeric value to compare to the number of threads in the thread-safe list.
Return Value
Boolean - True when the thread list is smaller than the specified value.
Description
IsCountLessThan is a Boolean function that indicates if the number of threads in the thread-safe list is below the threshold specified in AValue.

IsCountLessThan checks to make sure the current object instance is instantiated proper to retrieving the Cardinal length of the thread list. IsCountLessThan locks the thread list prior to getting the length, and unlocks the threads list immediately after retrieving the Cardinal value.

IsCountLessThan returns True when AValue is amller than the length of the thread-safe list, and False under any other condition.

Created with Doc-O-Matic 2 donated to Project JEDI. Commercial license available from the Doc-O-Matic site.