1 write to _lock
System.Threading.Tasks.Parallel (1)
System\Threading\Tasks\Parallel.ForEachAsync.cs (1)
567_lock = needsLock ? new SemaphoreSlim(initialCount: 1, maxCount: 1) : null;
4 references to _lock
System.Threading.Tasks.Parallel (4)
System\Threading\Tasks\Parallel.ForEachAsync.cs (4)
625Debug.Assert(_lock is not null, "Should only be invoked when _lock is non-null"); 626return _lock.WaitAsync(CancellationToken.None); 632Debug.Assert(_lock is not null, "Should only be invoked when _lock is non-null"); 633_lock.Release();