using System; using Cpp2IlInjected; namespace System.Threading { /// Specifies how a instance synchronizes access among multiple threads. // Token: 0x02000309 RID: 777 [Token(Token = "0x2000309")] public enum LazyThreadSafetyMode { /// The instance is not thread safe; if the instance is accessed from multiple threads, its behavior is undefined. Use this mode only when high performance is crucial and the instance is guaranteed never to be initialized from more than one thread. If you use a constructor that specifies an initialization method ( parameter), and if that initialization method throws an exception (or fails to handle an exception) the first time you call the property, then the exception is cached and thrown again on subsequent calls to the property. If you use a constructor that does not specify an initialization method, exceptions that are thrown by the default constructor for are not cached. In that case, a subsequent call to the property might successfully initialize the instance. If the initialization method recursively accesses the property of the instance, an is thrown. // Token: 0x04001077 RID: 4215 [Token(Token = "0x4001077")] None, /// When multiple threads try to initialize a instance simultaneously, all threads are allowed to run the initialization method (or the default constructor, if there is no initialization method). The first thread to complete initialization sets the value of the instance. That value is returned to any other threads that were simultaneously running the initialization method, unless the initialization method throws exceptions on those threads. Any instances of that were created by the competing threads are discarded. If the initialization method throws an exception on any thread, the exception is propagated out of the property on that thread. The exception is not cached. The value of the property remains , and subsequent calls to the property, either by the thread where the exception was thrown or by other threads, cause the initialization method to run again. If the initialization method recursively accesses the property of the instance, no exception is thrown. // Token: 0x04001078 RID: 4216 [Token(Token = "0x4001078")] PublicationOnly, /// Locks are used to ensure that only a single thread can initialize a instance in a thread-safe manner. If the initialization method (or the default constructor, if there is no initialization method) uses locks internally, deadlocks can occur. If you use a constructor that specifies an initialization method ( parameter), and if that initialization method throws an exception (or fails to handle an exception) the first time you call the property, then the exception is cached and thrown again on subsequent calls to the property. If you use a constructor that does not specify an initialization method, exceptions that are thrown by the default constructor for are not cached. In that case, a subsequent call to the property might successfully initialize the instance. If the initialization method recursively accesses the property of the instance, an is thrown. // Token: 0x04001079 RID: 4217 [Token(Token = "0x4001079")] ExecutionAndPublication } }