Hey,
I'm looking for a datastructure like a ordinary queue, it just need support for adding items with a timeout in seconds. When the given timeout occurs the item should automatically be removed from the queue.
Any ideas ?
Looking for a specific data structure
3 Answers
Know the answer? Post it. Somebody with the same question will find it here.

AlanRank #669 · 3.6K reputationPosted Nov 7, 2008, 10:46 AM EST
I'd just derive from the System.Collections.Queue class (or its generic equivalent) and override the virtual Enqueue and Dequeue methods to provide the timeout feature:
http://msdn.microsoft.com/en-us/library/system.collections.queue.aspx
Hest5 reputationPosted Nov 7, 2008, 11:38 AM EST
AlanRank #669 · 3.6K reputationPosted Nov 7, 2008, 1:45 PM EST