1 write to _lock
System.Threading.Tasks.Parallel (1)
System\Threading\Tasks\Parallel.ForEachAsync.cs (1)
543
_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)
601
Debug.Assert(
_lock
is not null, "Should only be invoked when _lock is non-null");
602
return
_lock
.WaitAsync(CancellationToken.None);
608
Debug.Assert(
_lock
is not null, "Should only be invoked when _lock is non-null");
609
_lock
.Release();