5
votes
Three steps to the blocking collection: [2] Dynamically allocated queue
The Delphi Geek
– [Step one: Inverse semaphore.] When I started thinking about the blocking collection internals (see step one) two facts become fairly obvious: The underlying data storage should be some kind of a queue. Blocking collection only needs the data storage to support enqueue (Add) and dequeue (Take). The underlying data storage should be allocated dynamically. Users will be using blocking collection on structures for which the size cannot be determined quickly (trees, for example) and therefore the code cannot preallocate »just big enough« data storage. I was all set on using locking ...
Statistics
|
Visits by Source |
User Actions |




