KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I have multiple producers and a single consumer. However if there is something in the queue that is not yet consumed a producer should not queue it again. (unique no duplicates blocking collection that uses the default concurrent queue) if (!myBlockingColl.Contains(item)) myBlockingColl.Add(item) However the blocking collection does not have a contains method nor does it provide any kind of TryPeek() like method. How can I access the underlying concurrent queue so I can do something like if (!myBlockingColl.myConcurQ.trypeek(item) myBlockingColl.Add(item) In a tail spin?
Tags (comma-separated)
Save Edits
Cancel