6 writes to _state
System.Private.CoreLib (6)
src\libraries\System.Private.CoreLib\src\System\Lazy.cs (6)
305_state = LazyHelper.Create(mode, useDefaultConstructor); 311_state = null; // volatile write, must occur after setting _value 322_state = null; // volatile write, must occur after setting _value 326_state = new LazyHelper(mode, exception); 353LazyHelper? previous = Interlocked.CompareExchange(ref _state, LazyHelper.PublicationOnlyWaitForOtherThreadToPublish, publicationOnly); 358_state = null; // volatile write, must occur after setting _value
7 references to _state
System.Private.CoreLib (7)
src\libraries\System.Private.CoreLib\src\System\Lazy.cs (7)
337if (ReferenceEquals(_state, executionAndPublication)) 383while (_state is not null) 395LazyHelper? state = _state; 465internal LazyThreadSafetyMode? Mode => LazyHelper.GetMode(_state); 470internal bool IsValueFaulted => LazyHelper.GetIsValueFaulted(_state); 481public bool IsValueCreated => _state == null; 505public T Value => _state == null ? _value! : CreateValue();