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 ?
Loading
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
AlanPosted Nov 7, 2008, 6:45 PM
HestPosted Nov 7, 2008, 4:38 PM
AlanPosted Nov 7, 2008, 3:46 PM
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