50 references to Read
Microsoft.AspNetCore.ConcurrencyLimiter (1)
ConcurrencyLimiterEventSource.cs (1)
91_rejectedRequestsCounter ??= new PollingCounter("requests-rejected", this, () => Volatile.Read(ref _rejectedRequests))
Microsoft.AspNetCore.Hosting (4)
Internal\HostingEventSource.cs (4)
94_requestsPerSecondCounter ??= new IncrementingPollingCounter("requests-per-second", this, () => Volatile.Read(ref _totalRequests)) 100_totalRequestsCounter ??= new PollingCounter("total-requests", this, () => Volatile.Read(ref _totalRequests)) 105_currentRequestsCounter ??= new PollingCounter("current-requests", this, () => Volatile.Read(ref _currentRequests)) 110_failedRequestsCounter ??= new PollingCounter("failed-requests", this, () => Volatile.Read(ref _failedRequests))
Microsoft.AspNetCore.Http.Connections (4)
Internal\HttpConnectionsEventSource.cs (4)
88_connectionsStartedCounter ??= new PollingCounter("connections-started", this, () => Volatile.Read(ref _connectionsStarted)) 92_connectionsStoppedCounter ??= new PollingCounter("connections-stopped", this, () => Volatile.Read(ref _connectionsStopped)) 96_connectionsTimedOutCounter ??= new PollingCounter("connections-timed-out", this, () => Volatile.Read(ref _connectionsTimedOut)) 100_currentConnectionsCounter ??= new PollingCounter("current-connections", this, () => Volatile.Read(ref _currentConnections))
Microsoft.AspNetCore.OutputCaching.StackExchangeRedis (1)
RedisOutputCacheStore.cs (1)
481var ticks = Volatile.Read(ref field); // avoid torn values
Microsoft.AspNetCore.Server.Kestrel.Core (10)
Internal\Infrastructure\KestrelEventSource.cs (10)
308_connectionsPerSecondCounter ??= new IncrementingPollingCounter("connections-per-second", this, () => Volatile.Read(ref _totalConnections)) 314_totalConnectionsCounter ??= new PollingCounter("total-connections", this, () => Volatile.Read(ref _totalConnections)) 319_tlsHandshakesPerSecondCounter ??= new IncrementingPollingCounter("tls-handshakes-per-second", this, () => Volatile.Read(ref _totalTlsHandshakes)) 325_totalTlsHandshakesCounter ??= new PollingCounter("total-tls-handshakes", this, () => Volatile.Read(ref _totalTlsHandshakes)) 330_currentTlsHandshakesCounter ??= new PollingCounter("current-tls-handshakes", this, () => Volatile.Read(ref _currentTlsHandshakes)) 335_failedTlsHandshakesCounter ??= new PollingCounter("failed-tls-handshakes", this, () => Volatile.Read(ref _failedTlsHandshakes)) 340_currentConnectionsCounter ??= new PollingCounter("current-connections", this, () => Volatile.Read(ref _currentConnections)) 345_connectionQueueLengthCounter ??= new PollingCounter("connection-queue-length", this, () => Volatile.Read(ref _connectionQueueLength)) 350_httpRequestQueueLengthCounter ??= new PollingCounter("request-queue-length", this, () => Volatile.Read(ref _httpRequestQueueLength)) 355_currrentUpgradedHttpRequestsCounter ??= new PollingCounter("current-upgraded-requests", this, () => Volatile.Read(ref _currentUpgradedHttpRequests))
Microsoft.AspNetCore.Server.Kestrel.Transport.Quic (1)
Internal\QuicConnectionContext.cs (1)
271stream.PoolExpirationTimestamp = Volatile.Read(ref _heartbeatTimestamp) + StreamPoolExpirySeconds * timeProvider.TimestampFrequency;
Microsoft.AspNetCore.SignalR.Client.Core (2)
HubConnection.cs (2)
2351if (DateTime.UtcNow.Ticks > Volatile.Read(ref _nextActivationServerTimeout)) 2356if (DateTime.UtcNow.Ticks > Volatile.Read(ref _nextActivationSendPing) && !Stopping)
Microsoft.AspNetCore.SignalR.Core (1)
HubConnectionContext.cs (1)
672var elapsed = _timeProvider.GetElapsedTime(Volatile.Read(ref _lastSendTick), currentTime);
Microsoft.Extensions.Caching.Memory (5)
MemoryCache.cs (5)
413hits += Volatile.Read(ref stats.Hits); 414misses += Volatile.Read(ref stats.Misses); 443_accumulatedHits += Volatile.Read(ref current.Hits); 444_accumulatedMisses += Volatile.Read(ref current.Misses); 782internal long Size => Volatile.Read(ref _cacheSize);
Microsoft.Extensions.Caching.StackExchangeRedis (1)
RedisCache.cs (1)
70var ticks = Volatile.Read(ref field); // avoid torn values
System.Collections.Concurrent (2)
System\Collections\Concurrent\PartitionerStatic.cs (2)
1090long oldSharedIndex = Volatile.Read(ref _sharedIndex.Value); 1132return Volatile.Read(ref _sharedIndex.Value) >= SourceCount - 1;
System.Private.CoreLib (10)
src\libraries\System.Private.CoreLib\src\System\IO\Strategies\OSFileStreamStrategy.cs (1)
279if (_fileHandle.TryGetCachedLength(out long cachedLength) && Volatile.Read(ref _filePosition) >= cachedLength)
src\libraries\System.Private.CoreLib\src\System\Runtime\MemoryFailPoint.cs (4)
92get => Volatile.Read(ref s_hiddenLastKnownFreeAddressSpace); 101get => Volatile.Read(ref s_hiddenLastTimeCheckingAddressSpace); 337Debug.Assert(Volatile.Read(ref s_failPointReservedMemory) >= 0, "Process-wide MemoryFailPoint reserved memory was negative!"); 338return (ulong)Volatile.Read(ref s_failPointReservedMemory);
src\libraries\System.Private.CoreLib\src\System\Threading\CancellationTokenSource.cs (2)
1144while (Volatile.Read(ref ExecutingCallbackId) == id) 1161while (Volatile.Read(ref ExecutingCallbackId) == id)
src\libraries\System.Private.CoreLib\src\System\Threading\Thread.cs (1)
586public static long VolatileRead(ref long address) => Volatile.Read(ref address);
src\libraries\System.Private.CoreLib\src\System\Threading\Volatile.cs (2)
49long result = Read(ref Unsafe.As<double, long>(ref Unsafe.AsRef(in location))); 190(ulong)Read(ref Unsafe.As<ulong, long>(ref Unsafe.AsRef(in location)));
System.Text.Json (2)
System\Text\Json\Serialization\Metadata\ReflectionEmitCachingMemberAccessor.Cache.cs (2)
42if (utcNowTicks - Volatile.Read(ref _lastEvictedTicks) >= _evictionIntervalTicks) 69if (utcNowTicks - Volatile.Read(ref kvp.Value.LastUsedTicks) >= _slidingExpirationTicks)
System.Text.RegularExpressions (4)
System\Text\RegularExpressions\Regex.Cache.cs (4)
168lastAccessedStamp = Volatile.Read(ref lastAccessed.LastAccessStamp); 237long min = Volatile.Read(ref s_cacheList[minListIndex].LastAccessStamp); 243long next = Volatile.Read(ref s_cacheList[nextIndex].LastAccessStamp); 264node.LastAccessStamp = Volatile.Read(ref lastAccessed.LastAccessStamp) + 1;
System.Threading (1)
System\Threading\Barrier.cs (1)
187get { return Volatile.Read(ref _currentPhase); }
System.Threading.Tasks.Parallel (1)
System\Threading\Tasks\ParallelLoopState.cs (1)
366return Unsafe.BitCast<long, TInt>(Volatile.Read(ref Unsafe.As<TInt, long>(ref _lowestBreakIteration)));