Note that there are some explanatory texts on larger screens.

plurals
  1. POWhat thread-safe collection classes are available in Silverlight 4?
    primarykey
    data
    text
    <p>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.</p> <p>On the server side, I would like to utilize the <a href="http://msdn.microsoft.com/en-us/library/dd287191.aspx" rel="nofollow noreferrer">ConcurrentDictionary</a> and <a href="http://msdn.microsoft.com/en-us/library/dd267265.aspx" rel="nofollow noreferrer">ConcurrentQueue</a> classes available in the <a href="http://msdn.microsoft.com/en-us/library/system.collections.concurrent.aspx" rel="nofollow noreferrer">System.Collections.Concurrent</a> namespace. These classes however are not implemented in Silverlight 4.</p> <p>The two approaches I am considering are:</p> <ol> <li>Decompile the ConcurrentDictionary and ConcurrentQueue classes and implement them in a Silverlight class library. These would be scoped using the <em>System.Collections.Concurrent</em> namespace.</li> <li>Implement the custom thread-safe collection classes I need in a shared library (or find a reliable Silverlight thread-safe collection implementation) that can be used both server and client side.</li> </ol> <p>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.</p> <p>The second approach would provide a consistent concurrent collection implementation both client and server side, but feels like I would be reinventing the wheel.</p> <p>It does not appear that implementing the <a href="http://msdn.microsoft.com/en-us/library/dd287191.aspx" rel="nofollow noreferrer">ConcurrentDictionary</a> and <a href="http://msdn.microsoft.com/en-us/library/dd267265.aspx" rel="nofollow noreferrer">ConcurrentQueue</a> classes in Silverlight would be very difficult, but is there already a well adopted library of thread-safe collection classes for Silverlight?</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload