Implements a thread-safe ISet wrapper.
Namespace: Iesi.CollectionsAssembly: Iesi.Collections (in Iesi.Collections.dll) Version: 1.0.1.0 (3.2.0.4000)
Syntax
C# |
---|
[SerializableAttribute] public sealed class SynchronizedSet : Set |
Visual Basic |
---|
<SerializableAttribute> _ Public NotInheritable Class SynchronizedSet _ Inherits Set |
Visual C++ |
---|
[SerializableAttribute] public ref class SynchronizedSet sealed : public Set |
Remarks
The implementation is extremely conservative, serializing critical sections
to prevent possible deadlocks, and locking on everything. The one exception
is for enumeration, which is inherently not thread-safe. For this, you have
to lock the SyncRoot object for the duration
of the enumeration.