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)
481
var 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)
271
stream.PoolExpirationTimestamp = Volatile.
Read
(ref _heartbeatTimestamp) + StreamPoolExpirySeconds * timeProvider.TimestampFrequency;
Microsoft.AspNetCore.SignalR.Client.Core (2)
HubConnection.cs (2)
2351
if (DateTime.UtcNow.Ticks > Volatile.
Read
(ref _nextActivationServerTimeout))
2356
if (DateTime.UtcNow.Ticks > Volatile.
Read
(ref _nextActivationSendPing) && !Stopping)
Microsoft.AspNetCore.SignalR.Core (1)
HubConnectionContext.cs (1)
672
var elapsed = _timeProvider.GetElapsedTime(Volatile.
Read
(ref _lastSendTick), currentTime);
Microsoft.Extensions.Caching.Memory (5)
MemoryCache.cs (5)
413
hits += Volatile.
Read
(ref stats.Hits);
414
misses += Volatile.
Read
(ref stats.Misses);
443
_accumulatedHits += Volatile.
Read
(ref current.Hits);
444
_accumulatedMisses += Volatile.
Read
(ref current.Misses);
782
internal long Size => Volatile.
Read
(ref _cacheSize);
Microsoft.Extensions.Caching.StackExchangeRedis (1)
RedisCache.cs (1)
70
var ticks = Volatile.
Read
(ref field); // avoid torn values
System.Collections.Concurrent (2)
System\Collections\Concurrent\PartitionerStatic.cs (2)
1090
long oldSharedIndex = Volatile.
Read
(ref _sharedIndex.Value);
1132
return Volatile.
Read
(ref _sharedIndex.Value) >= SourceCount - 1;
System.Private.CoreLib (10)
src\libraries\System.Private.CoreLib\src\System\IO\Strategies\OSFileStreamStrategy.cs (1)
279
if (_fileHandle.TryGetCachedLength(out long cachedLength) && Volatile.
Read
(ref _filePosition) >= cachedLength)
src\libraries\System.Private.CoreLib\src\System\Runtime\MemoryFailPoint.cs (4)
92
get => Volatile.
Read
(ref s_hiddenLastKnownFreeAddressSpace);
101
get => Volatile.
Read
(ref s_hiddenLastTimeCheckingAddressSpace);
337
Debug.Assert(Volatile.
Read
(ref s_failPointReservedMemory) >= 0, "Process-wide MemoryFailPoint reserved memory was negative!");
338
return (ulong)Volatile.
Read
(ref s_failPointReservedMemory);
src\libraries\System.Private.CoreLib\src\System\Threading\CancellationTokenSource.cs (2)
1144
while (Volatile.
Read
(ref ExecutingCallbackId) == id)
1161
while (Volatile.
Read
(ref ExecutingCallbackId) == id)
src\libraries\System.Private.CoreLib\src\System\Threading\Thread.cs (1)
586
public static long VolatileRead(ref long address) => Volatile.
Read
(ref address);
src\libraries\System.Private.CoreLib\src\System\Threading\Volatile.cs (2)
49
long 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)
42
if (utcNowTicks - Volatile.
Read
(ref _lastEvictedTicks) >= _evictionIntervalTicks)
69
if (utcNowTicks - Volatile.
Read
(ref kvp.Value.LastUsedTicks) >= _slidingExpirationTicks)
System.Text.RegularExpressions (4)
System\Text\RegularExpressions\Regex.Cache.cs (4)
168
lastAccessedStamp = Volatile.
Read
(ref lastAccessed.LastAccessStamp);
237
long min = Volatile.
Read
(ref s_cacheList[minListIndex].LastAccessStamp);
243
long next = Volatile.
Read
(ref s_cacheList[nextIndex].LastAccessStamp);
264
node.LastAccessStamp = Volatile.
Read
(ref lastAccessed.LastAccessStamp) + 1;
System.Threading (1)
System\Threading\Barrier.cs (1)
187
get { return Volatile.
Read
(ref _currentPhase); }
System.Threading.Tasks.Parallel (1)
System\Threading\Tasks\ParallelLoopState.cs (1)
366
return Unsafe.BitCast<long, TInt>(Volatile.
Read
(ref Unsafe.As<TInt, long>(ref _lowestBreakIteration)));