I have a BlockingCollection
that I m using in a classic publish-subscribe type example where the collection works as a buffer. When it reaches N it has to wait for the readers to consume at least one item. This works fine.
Now I would like to be able to reset the maximum number of items, the collection can hold, at runtime. I know how to use locks and monitors to achieve this and scrap the blockingcollection all together but I dont want to reimplement something that already exists in the core framework.
Is there any way to achieve that?