Share via


IsSynchronized Property

For the latest version of Commerce Server 2007 Help, see the Microsoft Web site.

Gets a value indicating whether access to the current CommerceCacheCollection is synchronized (thread-safe).

Namespace:  Microsoft.CommerceServer.Runtime.Caching
Assembly:  Microsoft.CommerceServer.Runtime (in Microsoft.CommerceServer.Runtime.dll)

Syntax

'Declaration
Public ReadOnly Property IsSynchronized As Boolean
'Usage
Dim instance As CommerceCacheCollection
Dim value As Boolean

value = instance.IsSynchronized
public bool IsSynchronized { get; }
public:
virtual property bool IsSynchronized {
    bool get () sealed;
}
public final function get IsSynchronized () : boolean

Property Value

Type: System..::.Boolean
false in all cases.

Implements

ICollection..::.IsSynchronized

Remarks

Enumerating through a collection is intrinsically not a thread-safe procedure. Even when a collection is synchronized, other threads could still modify the collection, which causes the enumerator to throw an exception. To guarantee thread safety during enumeration, you can either lock the collection during the entire enumeration or catch the exceptions resulting from changes made by other threads.

Permissions

See Also

Reference

CommerceCacheCollection Class

CommerceCacheCollection Members

Microsoft.CommerceServer.Runtime.Caching Namespace