Is there a way to remove a specific element from a BlockingCollection, for example:
IMyItem mySpecificItem = controller.getTopRequestedItem();
bool took = myBlockingCollection<IMyItem>.TryTake(out mySpecificItem);
if(took)
process(mySpecificItem);
.....
In other words: I want to remove an element from BlockingCollection <>, which is identified by some field (for example, ID), and not just the next available element.
Do I need to implement getHashCode () or IComparer?
source
share