5
votes
Vote UpVote

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 ...
Favorite? Off-Topic? gabr @ 2010-02-04 11:59

Statistics

Visits: 485
Votes: 5
Favorites: 0
Off-Topic: 0

Visits by Source

User Actions

Users who voted for this posting

Charles Ardour
Francis Ruiz
jamiei
knight_killer
Primoz Gabrijelcic
Subscribe:
Contact us to advertise on DelphiFeeds.com

Community Links

Torry Firebird News

Sponsor

 
Please login or register to use this functionality.
(click on this box to dismiss)