A “thread-safe proucer/consumer pattern” written in C#. It comes with a small demonstration File “Dummies.cs” and with a file containing a Main method “TestMain.cs”.
Download the package with
git clone git://github.com/defaude/tspcp.git
First, have a look at the Visual C# 2008 demonstration Project. It should be running out of the box. If you're familiar with the usage already, you can just copy the actual source files from the project folder into your own project.
SynchronizedQueue.cs: Provides a thread-safe, generic queue
AbstractQueueProducer.cs: Abstract base class for producers
AbstractQueueConsumer.cs: Abstract base class for consumers
This project can be found on github at:
If you have any annotations or additions, feel free to contact me - feedback is always very welcome! You can also fork my project and modify it just as you wish :)
This work is licensed under the Creative Commons Attribution 3.0 Germany License. To view a copy of this license, visit creativecommons.org/licenses/by/3.0/de/ or send a letter to
Creative Commons, 171 Second Street, Suite 300, San Francisco, California, 94105, USA