245 references to Read
dotnet (2)
Commands\Test\MTP\TestApplication.cs (2)
494Volatile.Read(ref _standardOutputCollector)?.FlushBufferedOutputIfLiveStreamingEnabled(liveOutputStreamingState); 495Volatile.Read(ref _standardErrorCollector)?.FlushBufferedOutputIfLiveStreamingEnabled(liveOutputStreamingState);
GenerateDocumentationAndConfigFiles (8)
src\roslyn\src\Compilers\Core\Portable\InternalUtilities\InterlockedOperations.cs (4)
34=> Volatile.Read(ref target!) ?? GetOrStore(ref target, valueFactory()); 49return Volatile.Read(ref target!) ?? GetOrStore(ref target, valueFactory(arg)); 87var box = Volatile.Read(ref target!) ?? GetOrStore(ref target, new StrongBox<T?>(valueFactory())); 105var box = Volatile.Read(ref target!) ?? GetOrStore(ref target, new StrongBox<T?>(valueFactory(arg)));
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+PrivateMarshal.cs (1)
22var dictionary = Volatile.Read(ref Unsafe.AsRef(in location._dictionary));
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedHashSet`1+PrivateMarshal.cs (1)
22var set = Volatile.Read(ref Unsafe.AsRef(in location._set));
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedList`1+PrivateMarshal.cs (1)
22var list = Volatile.Read(ref Unsafe.AsRef(in location._list));
src\roslyn\src\Dependencies\Threading\CancellationSeries.cs (1)
80var priorSource = Volatile.Read(ref _cts);
ILCompiler.TypeSystem (8)
src\runtime\src\coreclr\tools\Common\TypeSystem\Common\Utilities\LockFreeReaderHashtable.cs (8)
194sentinel = Volatile.Read(ref _entryInProcessOfWritingSentinel); 224sentinel = Volatile.Read(ref _entryInProcessOfWritingSentinel); 243TValue sentinel = Volatile.Read(ref _entryInProcessOfWritingSentinel); 250TValue value = Volatile.Read(ref hashtable[tableIndex]); 291TValue sentinel = Volatile.Read(ref _entryInProcessOfWritingSentinel); 405TValue examineEntry = Volatile.Read(ref hashTable[tableIndex]); 616sentinel = Volatile.Read(ref _entryInProcessOfWritingSentinel); 640sentinel = Volatile.Read(ref _entryInProcessOfWritingSentinel);
Microsoft.AspNetCore.Cryptography.Internal (1)
WeakReferenceHelpers.cs (1)
16WeakReference<T>? existingWeakRef = Volatile.Read(ref weakReference);
Microsoft.AspNetCore.DataProtection (10)
KeyManagement\KeyRing.cs (2)
78IAuthenticatedEncryptor? encryptor = Volatile.Read(ref _encryptor); 83encryptor = Volatile.Read(ref _encryptor);
KeyManagement\KeyRingBasedDataProtector.cs (1)
338var existingTemplate = Volatile.Read(ref _aadTemplate);
KeyManagement\KeyRingProvider.cs (7)
234existingCacheableKeyRing = Volatile.Read(ref _cacheableKeyRing); 256existingCacheableKeyRing = Volatile.Read(ref _cacheableKeyRing); 337var cached = Volatile.Read(ref _cacheableKeyRing); 353existingCacheableKeyRing = Volatile.Read(ref _cacheableKeyRing); 364existingCacheableKeyRing ??= Volatile.Read(ref _cacheableKeyRing); 458var newCacheableKeyRing = Volatile.Read(ref _cacheableKeyRing); 501var existingCacheableKeyRing = Volatile.Read(ref _cacheableKeyRing);
Microsoft.AspNetCore.DataProtection.Extensions (1)
TimeLimitedDataProtector.cs (1)
40var retVal = Volatile.Read(ref _innerProtectorWithTimeLimitedPurpose);
Microsoft.AspNetCore.Mvc.Core (1)
Infrastructure\ActionSelector.cs (1)
50var cache = Volatile.Read(ref _cache);
Microsoft.AspNetCore.Server.IIS (1)
Core\IO\AsyncIOOperation.cs (1)
23if (ReferenceEquals(Volatile.Read(ref _continuation), null))
Microsoft.AspNetCore.SignalR.Core (2)
HubConnectionContext.cs (2)
121var hubCallerContext = Volatile.Read(ref _hubCallerContext); 180get => Volatile.Read(ref _userIdentifier);
Microsoft.Build (4)
Evaluation\LazyItemEvaluator.cs (1)
154var normalizedItemValue = Volatile.Read(ref _normalizedItemValue);
src\5057ed6cf5d6323b\ImmutableSegmentedDictionary`2+PrivateMarshal.cs (1)
22var dictionary = Volatile.Read(ref Unsafe.AsRef(in location._dictionary));
src\5057ed6cf5d6323b\ImmutableSegmentedHashSet`1+PrivateMarshal.cs (1)
22var set = Volatile.Read(ref Unsafe.AsRef(in location._set));
src\5057ed6cf5d6323b\ImmutableSegmentedList`1+PrivateMarshal.cs (1)
22var list = Volatile.Read(ref Unsafe.AsRef(in location._list));
Microsoft.CodeAnalysis (8)
CodeGen\TokenMap.cs (1)
113object[] items = Volatile.Read(ref _items);
InternalUtilities\InterlockedOperations.cs (4)
34=> Volatile.Read(ref target!) ?? GetOrStore(ref target, valueFactory()); 49return Volatile.Read(ref target!) ?? GetOrStore(ref target, valueFactory(arg)); 87var box = Volatile.Read(ref target!) ?? GetOrStore(ref target, new StrongBox<T?>(valueFactory())); 105var box = Volatile.Read(ref target!) ?? GetOrStore(ref target, new StrongBox<T?>(valueFactory(arg)));
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+PrivateMarshal.cs (1)
22var dictionary = Volatile.Read(ref Unsafe.AsRef(in location._dictionary));
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedHashSet`1+PrivateMarshal.cs (1)
22var set = Volatile.Read(ref Unsafe.AsRef(in location._set));
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedList`1+PrivateMarshal.cs (1)
22var list = Volatile.Read(ref Unsafe.AsRef(in location._list));
Microsoft.CodeAnalysis.Analyzers (8)
src\roslyn\src\Compilers\Core\Portable\InternalUtilities\InterlockedOperations.cs (4)
34=> Volatile.Read(ref target!) ?? GetOrStore(ref target, valueFactory()); 49return Volatile.Read(ref target!) ?? GetOrStore(ref target, valueFactory(arg)); 87var box = Volatile.Read(ref target!) ?? GetOrStore(ref target, new StrongBox<T?>(valueFactory())); 105var box = Volatile.Read(ref target!) ?? GetOrStore(ref target, new StrongBox<T?>(valueFactory(arg)));
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+PrivateMarshal.cs (1)
22var dictionary = Volatile.Read(ref Unsafe.AsRef(in location._dictionary));
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedHashSet`1+PrivateMarshal.cs (1)
22var set = Volatile.Read(ref Unsafe.AsRef(in location._set));
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedList`1+PrivateMarshal.cs (1)
22var list = Volatile.Read(ref Unsafe.AsRef(in location._list));
src\roslyn\src\Dependencies\Threading\CancellationSeries.cs (1)
80var priorSource = Volatile.Read(ref _cts);
Microsoft.CodeAnalysis.AnalyzerUtilities (8)
src\roslyn\src\Compilers\Core\Portable\InternalUtilities\InterlockedOperations.cs (4)
34=> Volatile.Read(ref target!) ?? GetOrStore(ref target, valueFactory()); 49return Volatile.Read(ref target!) ?? GetOrStore(ref target, valueFactory(arg)); 87var box = Volatile.Read(ref target!) ?? GetOrStore(ref target, new StrongBox<T?>(valueFactory())); 105var box = Volatile.Read(ref target!) ?? GetOrStore(ref target, new StrongBox<T?>(valueFactory(arg)));
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+PrivateMarshal.cs (1)
22var dictionary = Volatile.Read(ref Unsafe.AsRef(in location._dictionary));
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedHashSet`1+PrivateMarshal.cs (1)
22var set = Volatile.Read(ref Unsafe.AsRef(in location._set));
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedList`1+PrivateMarshal.cs (1)
22var list = Volatile.Read(ref Unsafe.AsRef(in location._list));
src\roslyn\src\Dependencies\Threading\CancellationSeries.cs (1)
80var priorSource = Volatile.Read(ref _cts);
Microsoft.CodeAnalysis.CodeStyle (9)
src\roslyn\src\Analyzers\Core\Analyzers\OrderModifiers\OrderModifiersHelpers.cs (1)
51var lastParsed = Volatile.Read(ref _lastParsed);
src\roslyn\src\Compilers\Core\Portable\InternalUtilities\InterlockedOperations.cs (4)
34=> Volatile.Read(ref target!) ?? GetOrStore(ref target, valueFactory()); 49return Volatile.Read(ref target!) ?? GetOrStore(ref target, valueFactory(arg)); 87var box = Volatile.Read(ref target!) ?? GetOrStore(ref target, new StrongBox<T?>(valueFactory())); 105var box = Volatile.Read(ref target!) ?? GetOrStore(ref target, new StrongBox<T?>(valueFactory(arg)));
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+PrivateMarshal.cs (1)
22var dictionary = Volatile.Read(ref Unsafe.AsRef(in location._dictionary));
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedHashSet`1+PrivateMarshal.cs (1)
22var set = Volatile.Read(ref Unsafe.AsRef(in location._set));
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedList`1+PrivateMarshal.cs (1)
22var list = Volatile.Read(ref Unsafe.AsRef(in location._list));
src\roslyn\src\Dependencies\Threading\CancellationSeries.cs (1)
80var priorSource = Volatile.Read(ref _cts);
Microsoft.CodeAnalysis.CSharp (18)
Compilation\CSharpCompilation.cs (1)
146internal ImmutableHashSet<SyntaxTree>? UsageOfUsingsRecordedInTrees => Volatile.Read(ref _usageOfUsingsRecordedInTrees);
Symbols\Metadata\PE\PEGlobalNamespaceSymbol.cs (2)
86if (Volatile.Read(ref lazyTypes) == null || Volatile.Read(ref lazyNamespaces) == null)
Symbols\Metadata\PE\PENamedTypeSymbol.cs (2)
1713if (Volatile.Read(ref _lazyMembersByName) == null) 1893if (Volatile.Read(ref _lazyMembersByName) == null)
Symbols\Metadata\PE\PENestedNamespaceSymbol.cs (1)
128var typesByNS = Volatile.Read(ref _typesByNS);
Symbols\Source\SourceMemberContainerSymbol.cs (12)
1716if (Volatile.Read(ref _lazyMembersDictionary) is Dictionary<ReadOnlyMemory<char>, ImmutableArray<Symbol>> result) 1829RoslynDebug.AssertOrFailFast(Volatile.Read(ref _lazyTypeMembers)?.Values.Any(types => types.Contains(t => t == (object)type)) == true); 1853var membersAndInitializers = Volatile.Read(ref _lazyMembersAndInitializers); 1868var declared = Volatile.Read(ref _lazyDeclaredMembersAndInitializers); 1881membersAndInitializers = Volatile.Read(ref _lazyMembersAndInitializers); 3676if (Volatile.Read(ref _lazyMembersAndInitializers) != null) 3693if (Volatile.Read(ref _lazyMembersAndInitializers) is not null) 3746if (Volatile.Read(ref _lazyDeclaredMembersAndInitializers) != DeclaredMembersAndInitializers.UninitializedSentinel) 3867var declared = Volatile.Read(ref _lazyDeclaredMembersAndInitializers); 3888var declared = Volatile.Read(ref _lazyDeclaredMembersAndInitializers); 3935var declared = Volatile.Read(ref _lazyDeclaredMembersAndInitializers); 3962var declared = Volatile.Read(ref _lazyDeclaredMembersAndInitializers);
Microsoft.CodeAnalysis.Extensions.Package (3)
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+PrivateMarshal.cs (1)
22var dictionary = Volatile.Read(ref Unsafe.AsRef(in location._dictionary));
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedHashSet`1+PrivateMarshal.cs (1)
22var set = Volatile.Read(ref Unsafe.AsRef(in location._set));
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedList`1+PrivateMarshal.cs (1)
22var list = Volatile.Read(ref Unsafe.AsRef(in location._list));
Microsoft.CodeAnalysis.Features (4)
NavigateTo\AbstractNavigateToSearchService.CachedDocumentSearch.cs (3)
62cachedIndexMap = Volatile.Read(ref s_cachedIndexMap); 63cachedFilterIndexMap = Volatile.Read(ref s_cachedFilterIndexMap); 64stringTable = Volatile.Read(ref s_stringTable);
src\roslyn\src\Analyzers\Core\Analyzers\OrderModifiers\OrderModifiersHelpers.cs (1)
51var lastParsed = Volatile.Read(ref _lastParsed);
Microsoft.CodeAnalysis.ResxSourceGenerator (8)
src\roslyn\src\Compilers\Core\Portable\InternalUtilities\InterlockedOperations.cs (4)
34=> Volatile.Read(ref target!) ?? GetOrStore(ref target, valueFactory()); 49return Volatile.Read(ref target!) ?? GetOrStore(ref target, valueFactory(arg)); 87var box = Volatile.Read(ref target!) ?? GetOrStore(ref target, new StrongBox<T?>(valueFactory())); 105var box = Volatile.Read(ref target!) ?? GetOrStore(ref target, new StrongBox<T?>(valueFactory(arg)));
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+PrivateMarshal.cs (1)
22var dictionary = Volatile.Read(ref Unsafe.AsRef(in location._dictionary));
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedHashSet`1+PrivateMarshal.cs (1)
22var set = Volatile.Read(ref Unsafe.AsRef(in location._set));
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedList`1+PrivateMarshal.cs (1)
22var list = Volatile.Read(ref Unsafe.AsRef(in location._list));
src\roslyn\src\Dependencies\Threading\CancellationSeries.cs (1)
80var priorSource = Volatile.Read(ref _cts);
Microsoft.CodeAnalysis.VisualBasic (5)
Symbols\Attributes\PEAttributeData.vb (1)
123If Volatile.Read(_lazyConstructorArguments) Is Nothing Then
Symbols\Metadata\PE\PEGlobalNamespaceSymbol.vb (2)
66If Volatile.Read(m_lazyTypes) Is Nothing OrElse Volatile.Read(m_lazyMembers) Is Nothing Then
Symbols\Metadata\PE\PENestedNamespaceSymbol.vb (1)
121Dim typesByNS = Volatile.Read(_typesByNS)
Symbols\WellKnownMembers.vb (1)
126ctorError = DirectCast(Volatile.Read(_lazyExtensionAttributeConstructorErrorInfo), DiagnosticInfo)
Microsoft.CodeAnalysis.Workspaces (11)
src\roslyn\src\Compilers\Core\Portable\InternalUtilities\InterlockedOperations.cs (4)
34=> Volatile.Read(ref target!) ?? GetOrStore(ref target, valueFactory()); 49return Volatile.Read(ref target!) ?? GetOrStore(ref target, valueFactory(arg)); 87var box = Volatile.Read(ref target!) ?? GetOrStore(ref target, new StrongBox<T?>(valueFactory())); 105var box = Volatile.Read(ref target!) ?? GetOrStore(ref target, new StrongBox<T?>(valueFactory(arg)));
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+PrivateMarshal.cs (1)
22var dictionary = Volatile.Read(ref Unsafe.AsRef(in location._dictionary));
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedHashSet`1+PrivateMarshal.cs (1)
22var set = Volatile.Read(ref Unsafe.AsRef(in location._set));
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedList`1+PrivateMarshal.cs (1)
22var list = Volatile.Read(ref Unsafe.AsRef(in location._list));
src\roslyn\src\Dependencies\Threading\CancellationSeries.cs (1)
80var priorSource = Volatile.Read(ref _cts);
Workspace\Solution\SolutionCompilationState.RegularCompilationTracker.cs (1)
86=> Volatile.Read(ref _stateDoNotAccessDirectly);
Workspace\Workspace.cs (2)
158return Volatile.Read(ref _latestSolution); 479var oldSolution = Volatile.Read(ref _latestSolution);
Microsoft.Extensions.Caching.Hybrid (1)
Internal\DefaultHybridCache.ImmutableCacheItem.cs (1)
30ImmutableCacheItem<T>? obj = Volatile.Read(ref _sharedDefault);
Microsoft.Extensions.Diagnostics (6)
Tracing\DefaultActivitySourceFactory.cs (6)
272ListenerState state = Volatile.Read(ref _state); 284ListenerState state = Volatile.Read(ref _state); 296ListenerState state = Volatile.Read(ref _state); 306ListenerState state = Volatile.Read(ref _state); 316ListenerState state = Volatile.Read(ref _state); 389ListenerState state = Volatile.Read(ref _state);
Microsoft.Extensions.Hosting (1)
Internal\Host.cs (1)
337List<Exception>? backgroundServiceExceptions = Volatile.Read(ref _backgroundServiceExceptions);
Microsoft.Extensions.ML (2)
PoolLoader.cs (2)
54public ObjectPool<PredictionEngine<TData, TPrediction>> PredictionEnginePool { get { return Volatile.Read(ref _pool); } } 62var pool = Volatile.Read(ref _pool);
Microsoft.Extensions.Primitives (2)
ChangeToken.cs (2)
113if (Volatile.Read(ref _disposable) == _disposedSentinel) 132IDisposable? current = Volatile.Read(ref _disposable);
Microsoft.ML.Tokenizers (3)
Model\CodeGenTokenizer.cs (1)
266IReadOnlyDictionary<string, int>? publicVocab = Volatile.Read(ref _vocabOriginal);
Model\EnglishRobertaTokenizer.cs (1)
236Dictionary<string, int>? publicVocab = Volatile.Read(ref _vocabOriginal);
Model\SentencePieceBpeModel.cs (1)
48IReadOnlyDictionary<string, int>? publicVocab = Volatile.Read(ref _publicVocab);
Roslyn.Diagnostics.Analyzers (8)
src\roslyn\src\Compilers\Core\Portable\InternalUtilities\InterlockedOperations.cs (4)
34=> Volatile.Read(ref target!) ?? GetOrStore(ref target, valueFactory()); 49return Volatile.Read(ref target!) ?? GetOrStore(ref target, valueFactory(arg)); 87var box = Volatile.Read(ref target!) ?? GetOrStore(ref target, new StrongBox<T?>(valueFactory())); 105var box = Volatile.Read(ref target!) ?? GetOrStore(ref target, new StrongBox<T?>(valueFactory(arg)));
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedDictionary`2+PrivateMarshal.cs (1)
22var dictionary = Volatile.Read(ref Unsafe.AsRef(in location._dictionary));
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedHashSet`1+PrivateMarshal.cs (1)
22var set = Volatile.Read(ref Unsafe.AsRef(in location._set));
src\roslyn\src\Dependencies\Collections\Segmented\ImmutableSegmentedList`1+PrivateMarshal.cs (1)
22var list = Volatile.Read(ref Unsafe.AsRef(in location._list));
src\roslyn\src\Dependencies\Threading\CancellationSeries.cs (1)
80var priorSource = Volatile.Read(ref _cts);
System.Collections.Immutable (16)
System\Collections\Immutable\ImmutableInterlocked.cs (16)
39T oldValue = Volatile.Read(ref location); 86T oldValue = Volatile.Read(ref location); 128T[]? oldArray = Volatile.Read(ref Unsafe.AsRef(in location.array)); 175T[]? oldArray = Volatile.Read(ref Unsafe.AsRef(in location.array)); 258ImmutableDictionary<TKey, TValue> map = Volatile.Read(ref location); 287ImmutableDictionary<TKey, TValue> map = Volatile.Read(ref location); 311ImmutableDictionary<TKey, TValue> priorCollection = Volatile.Read(ref location); 350ImmutableDictionary<TKey, TValue> priorCollection = Volatile.Read(ref location); 397ImmutableDictionary<TKey, TValue> priorCollection = Volatile.Read(ref location); 440ImmutableDictionary<TKey, TValue> priorCollection = Volatile.Read(ref location); 473ImmutableDictionary<TKey, TValue> priorCollection = Volatile.Read(ref location); 506ImmutableDictionary<TKey, TValue> priorCollection = Volatile.Read(ref location); 539ImmutableStack<T> priorCollection = Volatile.Read(ref location); 568ImmutableStack<T> priorCollection = Volatile.Read(ref location); 594ImmutableQueue<T> priorCollection = Volatile.Read(ref location); 623ImmutableQueue<T> priorCollection = Volatile.Read(ref location);
System.CommandLine (1)
Invocation\ProcessTerminationHandler.cs (1)
89var startedHandler = Volatile.Read(ref _startedHandler);
System.ComponentModel.TypeConverter (2)
System\ComponentModel\TypeDescriptor.cs (2)
2295RefreshEventHandler? handler = Volatile.Read(ref Refreshed); 2302RefreshEventHandler? handler = Volatile.Read(ref Refreshed);
System.Console (9)
System\Console.cs (8)
48return Volatile.Read(ref s_in) ?? EnsureInitialized(); 75Encoding? encoding = Volatile.Read(ref s_inputEncoding); 112Encoding? encoding = Volatile.Read(ref s_outputEncoding); 201return Volatile.Read(ref s_out) ?? EnsureInitialized(); 221return Volatile.Read(ref s_error) ?? EnsureInitialized(); 259StrongBox<bool> redirected = Volatile.Read(ref _isStdInRedirected) ?? EnsureInitialized(); 274StrongBox<bool> redirected = Volatile.Read(ref _isStdOutRedirected) ?? EnsureInitialized(); 289StrongBox<bool> redirected = Volatile.Read(ref _isStdErrRedirected) ?? EnsureInitialized();
System\ConsolePal.Unix.cs (1)
86return Volatile.Read(ref s_stdInReader) ?? EnsureInitialized();
System.Diagnostics.DiagnosticSource (3)
System\Diagnostics\ActivitySource.cs (3)
83SynchronizedList<ActivityListener>? listeners = Volatile.Read(ref _listeners); 476SynchronizedList<ActivityListener>? listeners = Volatile.Read(ref _listeners); 503SynchronizedList<ActivityListener>? listeners = Volatile.Read(ref _listeners);
System.IO.Pipes (1)
Microsoft\Win32\SafeHandles\SafePipeHandle.Unix.cs (1)
43if (disposing && Volatile.Read(ref _pipeSocket) is Socket socket)
System.Linq.Expressions (2)
System\Dynamic\Utils\CacheDict.cs (2)
58Entry entry = Volatile.Read(ref _entries[idx]); 78Entry entry = Volatile.Read(ref _entries[idx]);
System.Net.Http (1)
System\Net\Http\SocketsHttpHandler\Http3Connection.cs (1)
54public Exception? AbortException => Volatile.Read(ref _abortException);
System.Net.Http.WinHttpHandler (1)
src\runtime\src\libraries\Common\src\System\Threading\Tasks\RendezvousAwaitable.cs (1)
44Action? c = Volatile.Read(ref _continuation);
System.Net.Quic (2)
System\Net\Quic\QuicStream.cs (2)
467exception = Volatile.Read(ref _sendException); 622Exception? exception = Volatile.Read(ref _sendException);
System.Net.Sockets (1)
System\Net\Sockets\TCPClient.cs (1)
279Socket chkClientSocket = Volatile.Read(ref _clientSocket);
System.Net.WebClient (1)
src\runtime\src\libraries\Common\src\System\Threading\Tasks\RendezvousAwaitable.cs (1)
44Action? c = Volatile.Read(ref _continuation);
System.Private.CoreLib (45)
Internal\Runtime\Augments\RuntimeAugments.cs (1)
279return Volatile.Read<object>(ref Unsafe.As<IntPtr, object>(ref *(IntPtr*)address));
src\runtime\src\coreclr\tools\Common\TypeSystem\Common\Utilities\LockFreeReaderHashtable.cs (8)
194sentinel = Volatile.Read(ref _entryInProcessOfWritingSentinel); 224sentinel = Volatile.Read(ref _entryInProcessOfWritingSentinel); 243TValue sentinel = Volatile.Read(ref _entryInProcessOfWritingSentinel); 250TValue value = Volatile.Read(ref hashtable[tableIndex]); 291TValue sentinel = Volatile.Read(ref _entryInProcessOfWritingSentinel); 405TValue examineEntry = Volatile.Read(ref hashTable[tableIndex]); 616sentinel = Volatile.Read(ref _entryInProcessOfWritingSentinel); 640sentinel = Volatile.Read(ref _entryInProcessOfWritingSentinel);
src\runtime\src\libraries\System.Private.CoreLib\src\System\Collections\Concurrent\ConcurrentQueue.cs (2)
767ConcurrentQueueSegment<T>? next = Volatile.Read(ref s._nextSegment); 785else if (Volatile.Read(ref s._nextSegment) == null)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Diagnostics\Tracing\TraceLogging\TraceLoggingEventHandleTable.cs (1)
27IntPtr[] innerTable = Volatile.Read(ref m_innerTable);
src\runtime\src\libraries\System.Private.CoreLib\src\System\Reflection\Emit\Opcode.cs (1)
112string name = Volatile.Read(ref nameCache[idx]);
src\runtime\src\libraries\System.Private.CoreLib\src\System\Threading\CancellationTokenSource.cs (3)
329Registrations? registrations = Volatile.Read(ref _registrations); 500Volatile.Read(ref _registrations)?.UnregisterAll(); 605Registrations? registrations = Volatile.Read(ref _registrations);
src\runtime\src\libraries\System.Private.CoreLib\src\System\Threading\LazyInitializer.cs (4)
51Volatile.Read(ref target!) ?? EnsureInitializedCore(ref target); 103Volatile.Read(ref target!) ?? EnsureInitializedCore(ref target, valueFactory); 243Volatile.Read(ref target!) ?? EnsureInitializedCore(ref target, ref syncLock, valueFactory); 262if (Volatile.Read(ref target) == null)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Threading\Tasks\ConcurrentExclusiveSchedulerPair.cs (1)
149return Volatile.Read(ref m_completionState) ?? InitializeCompletionState();
src\runtime\src\libraries\System.Private.CoreLib\src\System\Threading\Tasks\Sources\ManualResetValueTaskSourceCore.cs (1)
83internal bool IsCompleted => ReferenceEquals(Volatile.Read(ref _continuation), ManualResetValueTaskSourceCoreShared.s_sentinel);
src\runtime\src\libraries\System.Private.CoreLib\src\System\Threading\Tasks\Task.cs (15)
198Volatile.Read(ref s_currentActiveTasks) ?? 227return Volatile.Read(ref s_runtimeAsyncContinuationTimestamps) ?? 234return Volatile.Read(ref s_runtimeAsyncTaskTimestamps) ?? 1465ContingentProperties? props = Volatile.Read(ref m_contingentProperties); 1479return Volatile.Read(ref m_contingentProperties) ?? InitializeContingentProperties(); 1504ContingentProperties? props = Volatile.Read(ref m_contingentProperties); 1661ContingentProperties? props = Volatile.Read(ref m_contingentProperties); 1766ContingentProperties? cp = Volatile.Read(ref m_contingentProperties); 2025return Volatile.Read(ref m_contingentProperties)?.m_exceptionsHolder?.GetCancellationExceptionDispatchInfo(); // may be null 2031Volatile.Read(ref m_contingentProperties)?.m_exceptionsHolder?.MarkAsHandled(calledFromFinalizer: false); 2201ContingentProperties? cp = Volatile.Read(ref m_contingentProperties); 2249cp = Volatile.Read(ref m_contingentProperties); // need to re-read after updating state 2311ContingentProperties? props = Volatile.Read(ref m_contingentProperties); 2372TaskExceptionHolder? exceptionHolder = Volatile.Read(ref task.m_contingentProperties)!.m_exceptionsHolder; 3465ContingentProperties? cp = Volatile.Read(ref m_contingentProperties);
src\runtime\src\libraries\System.Private.CoreLib\src\System\Threading\Thread.cs (1)
586public static object? VolatileRead([NotNullIfNotNull(nameof(address))] ref object? address) => Volatile.Read(ref address);
src\runtime\src\libraries\System.Private.CoreLib\src\System\Threading\ThreadPoolWorkQueue.cs (3)
293object? obj = Volatile.Read(ref m_array[idx]); 313object? obj = Volatile.Read(ref m_array[idx]); 358object? obj = Volatile.Read(ref m_array[idx]);
src\runtime\src\libraries\System.Private.CoreLib\src\System\Threading\WaitSubsystem.ThreadWaitInfo.Unix.cs (1)
562return Volatile.Read(ref _namedMutexOwnershipChain) ?? AllocateOwnershipChain();
System\Reflection\Runtime\TypeInfos\RuntimeTypeInfo.TypeComponentsCache.cs (1)
69object result = Volatile.Read(ref _nameAgnosticQueryCaches[index]);
System\Threading\ManagedThreadId.cs (2)
216var priorIdDispenser = Volatile.Read(ref s_idDispenser); 238var priorIdDispenser = Volatile.Read(ref s_idDispenser);
System.Reflection.Metadata (1)
System\Reflection\PortableExecutable\PEReader.cs (1)
390AbstractMemoryBlock? existingBlock = Volatile.Read(ref _lazyPESectionBlocks[index]);
System.Reflection.MetadataLoadContext (4)
System\Reflection\TypeLoading\Assemblies\RoAssembly.Modules.cs (2)
53RoModule? module = Volatile.Read(ref _loadedModules[i]); 79RoModule? prior = Volatile.Read(ref _loadedModules[loadedModulesIndex]);
System\Reflection\TypeLoading\General\Ecma\MetadataTable.cs (1)
36T? result = Volatile.Read(ref table[index]);
System\Reflection\TypeLoading\RuntimeTypeInfo.TypeComponentsCache.cs (1)
65object result = Volatile.Read(ref _nameAgnosticQueryCaches[index]);
System.Security.Cryptography (1)
src\runtime\src\libraries\Common\src\Interop\Windows\BCrypt\BCryptAeadHandleCache.cs (1)
28SafeAlgorithmHandle? existingHandle = Volatile.Read(ref handle);
System.Text.Json (3)
System\Text\Json\Serialization\Metadata\JsonPropertyInfo.cs (1)
166Func<ICustomAttributeProvider>? attributeProviderFactory = Volatile.Read(ref AttributeProviderFactory);
System\Text\Json\Serialization\Metadata\JsonTypeInfo.cs (2)
891Func<ICustomAttributeProvider>? ctorAttrProviderFactory = Volatile.Read(ref ConstructorAttributeProviderFactory); 1095JsonTypeClassifierFactory? factory = Volatile.Read(ref _typeClassifierFactory);
System.Threading.Channels (2)
System\Threading\Channels\AsyncOperation.cs (2)
142internal bool IsCompleted => ReferenceEquals(Volatile.Read(ref _continuation), s_completedSentinel); 209if (Volatile.Read(ref _continuation) is not null ||
System.Threading.Tasks.Dataflow (5)
Blocks\BroadcastBlock.cs (1)
1142(Volatile.Read(ref _exceptions) != null && _decliningPermanently);
Internal\SourceCore.cs (1)
497return Volatile.Read(ref _exceptions) != null;
Internal\TargetCore.cs (3)
708return _dataflowBlockOptions.CancellationToken.IsCancellationRequested || Volatile.Read(ref _exceptions) != null; 776if (Volatile.Read(ref _exceptions) != null) 781_completionSource.TrySetException(Volatile.Read(ref _exceptions!));
System.Xaml (1)
System\Xaml\Schema\TypeBits.cs (1)
78object value = Volatile.Read(ref _value);