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)
625
Debug.Assert(
_lock
is not null, "Should only be invoked when _lock is non-null");
626
return
_lock
.WaitAsync(CancellationToken.None);
632
Debug.Assert(
_lock
is not null, "Should only be invoked when _lock is non-null");
633
_lock
.Release();