November 2019
Beginner to intermediate
674 pages
15h
English
Sometimes you don't need to implement an additional locking mechanism because Delphi already does that for you. The runtime library contains three such data structures—TThreadList, TThreadList<T>, and TThreadedQueue<T>. The first one can be found in the System.Classes unit, while the other two live in System.Generics.Collections.
Both variants of TThreadList work the same. They don't expose the normal list-management functions (such as Add, Remove, Items[], and so on). Instead of that, they implement the LockList function, which uses TMonitor to acquire access to an internal TList (or TList<T>) object and returns that object. To release access to this list, the program has to call the UnlockList function. ...
Read now
Unlock full access