ConcurrentHashSet
ConcurrentHashSet copied to clipboard
Implement IProducerConsumerCollection
Should ConcurrentHashSet implement IProducerConsumerCollection?
As per the doc, they now recommend it
As per the doc, they now recommend it
What recommendation are you referring to?
Oh gosh, it’s been awhile, it was in the Microsoft documentation in the concurrent collections docs. I’ll have to find it again this weekend
The thing is that ConcurrentHashSet is different than the other collections.
The difference between the rest is just the order of items.
Would it make sense to add and take from a hashset based collection? In what order would TryTake return items?
For example ConcurrentDictionary doesn't implement the interface.. but they could've easily done it with key-value pairs.