I am developing an application framework that will be utilized by Silverlight on the client side and .NET 4 on the server side. Internally, the framework has dictionary and queue data structures where multiple threads will be accessing the collections concurrently.
On the server side, I would like to utilize the ConcurrentDictionary and ConcurrentQueue classes available in the System.Collections.Concurrent namespace. These classes however are not implemented in Silverlight 4.
The two approaches I am considering are:
The first approach would allow me to just implement the Silverlight data structures that I need, but I worry about introducing disparities between my Silverlight implementation and the concurrent collection classes implemented in .NET 4.
The second approach would provide a consistent concurrent collection implementation both client and server side, but feels like I would be reinventing the wheel.
It does not appear that implementing the ConcurrentDictionary and ConcurrentQueue classes in Silverlight would be very difficult, but is there already a well adopted library of thread-safe collection classes for Silverlight?
Try this out: http://ch.codeplex.com/