Point3DKeyFrameCollection.IsSynchronized Point3DKeyFrameCollection.IsSynchronized Point3DKeyFrameCollection.IsSynchronized Point3DKeyFrameCollection.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.

适用于