I had the need again recently to use the producer-consumer pattern, so I got to work. I found the post I made a couple years ago, downloaded the code from it, and copied/pasted the code into my project (the only thing changing being the namespace). Not a big deal, but it takes a few minutes. I've done this process in at least two other projects, and it's annoying. I also really don't like that I've made exact duplicates of this class in multiple places. What's worse, I've made little improvements to it in each of the projects, so the codebases are beginning to diverge. If only there was a way to package it up and make it available, for free, to anyone that wanted it. And if only there was a way to maintain a historical record the different "versions" of the class.
If only.
So anyway, I created a NuGet package for the producer/consumer class. It's called RandomSkunk.ProducerConsumer. And the project is now on GitHub.
I shoulda done this a long time ago.
No comments:
Post a Comment