ThicknessKeyFrameCollection.IsSynchronized ThicknessKeyFrameCollection.IsSynchronized ThicknessKeyFrameCollection.IsSynchronized ThicknessKeyFrameCollection.IsSynchronized Property

定義

取得值,指示對集合的存取是否為同步的 (安全執行緒)。Gets a value that indicates whether access to the collection is synchronized (thread-safe).

public:
 property bool IsSynchronized { bool get(); };
public bool IsSynchronized { get; }
member this.IsSynchronized : bool
Public ReadOnly Property IsSynchronized As Boolean

屬性值

如果集合存取會同步處理 (安全執行緒),則為 true,否則為 falsetrue if access to the collection is synchronized (thread-safe); otherwise, false.

實作

備註

透過集合進行列舉在本質上並非安全執行緒程序。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.

適用於