18 instantiations of NonReentrantLock
Microsoft.CodeAnalysis.Features (4)
ExternalAccess\UnitTesting\SolutionCrawler\UnitTestingWorkCoordinator.UnitTestingSemanticChangeProcessor.cs (2)
38private readonly NonReentrantLock _workGate = new(); 339private readonly NonReentrantLock _workGate = new();
SolutionCrawler\WorkCoordinator.SemanticChangeProcessor.cs (2)
37private readonly NonReentrantLock _workGate = new(); 338private readonly NonReentrantLock _workGate = new();
Microsoft.CodeAnalysis.Workspaces (10)
AsyncLazy`1.cs (1)
66private static readonly NonReentrantLock s_gate = new(useThisInstanceForSynchronization: true);
CancellableLazy`1.cs (1)
19_gate = new NonReentrantLock();
EventMap.cs (1)
15private readonly NonReentrantLock _guard = new();
NonReentrantLock.cs (1)
66public static readonly Func<NonReentrantLock> Factory = () => new NonReentrantLock(useThisInstanceForSynchronization: true);
Shared\TestHooks\AsynchronousOperationListener.cs (1)
18private readonly NonReentrantLock _gate = new();
Utilities\Documentation\XmlDocumentationProvider.cs (1)
24private readonly NonReentrantLock _gate = new();
Workspace\Host\Metadata\MetadataReferenceCache.cs (1)
44private readonly NonReentrantLock _gate = new();
Workspace\Solution\ProjectDependencyGraph.cs (1)
38private readonly NonReentrantLock _dataLock = new();
Workspace\Solution\WeaklyCachedRecoverableValueSource.cs (1)
24private static readonly NonReentrantLock s_taskGuard = new();
Workspace\Workspace.cs (1)
46private readonly NonReentrantLock _stateLock = new(useThisInstanceForSynchronization: true);
Microsoft.CodeAnalysis.Workspaces.MSBuild (3)
MSBuild\MSBuildProjectLoader.cs (1)
31private readonly NonReentrantLock _dataGuard = new();
MSBuild\MSBuildWorkspace.cs (1)
32private readonly NonReentrantLock _serializationLock = new();
MSBuild\ProjectFile\ProjectFileLoaderRegistry.cs (1)
26_dataGuard = new NonReentrantLock();
Microsoft.VisualStudio.LanguageServices.Implementation (1)
CodeModel\ProjectCodeModel.cs (1)
23private readonly NonReentrantLock _guard = new NonReentrantLock();
33 references to NonReentrantLock
Microsoft.CodeAnalysis.Features (8)
ExternalAccess\UnitTesting\SolutionCrawler\UnitTestingWorkCoordinator.UnitTestingSemanticChangeProcessor.cs (4)
38private readonly NonReentrantLock _workGate = new(); 266private static TValue DequeueWorker<TKey, TValue>(NonReentrantLock gate, Dictionary<TKey, TValue> map, CancellationToken cancellationToken) 286private static void ClearQueueWorker<TKey, TValue>(NonReentrantLock gate, Dictionary<TKey, TValue> map, Func<TValue, IDisposable> disposerSelector) 339private readonly NonReentrantLock _workGate = new();
SolutionCrawler\WorkCoordinator.SemanticChangeProcessor.cs (4)
37private readonly NonReentrantLock _workGate = new(); 265private static TValue DequeueWorker<TKey, TValue>(NonReentrantLock gate, Dictionary<TKey, TValue> map, CancellationToken cancellationToken) 285private static void ClearQueueWorker<TKey, TValue>(NonReentrantLock gate, Dictionary<TKey, TValue> map, Func<TValue, IDisposable> disposerSelector) 338private readonly NonReentrantLock _workGate = new();
Microsoft.CodeAnalysis.Workspaces (21)
AsyncLazy`1.cs (1)
66private static readonly NonReentrantLock s_gate = new(useThisInstanceForSynchronization: true);
CancellableLazy`1.cs (2)
13private NonReentrantLock? _gate; 50var gate = _gate;
EventMap.cs (1)
15private readonly NonReentrantLock _guard = new();
NonReentrantLock.cs (8)
21/// The <see cref="NonReentrantLock"/> provides a lightweight mutual exclusion class that doesn't 33/// All public members of <see cref="NonReentrantLock"/> are thread-safe and may be used concurrently 66public static readonly Func<NonReentrantLock> Factory = () => new NonReentrantLock(useThisInstanceForSynchronization: true); 69/// Blocks the current thread until it can enter the <see cref="NonReentrantLock"/>, while observing a 223/// <param name="obj">The syncLock that protects a <see cref="NonReentrantLock"/> instance.</param> 241/// Since we want to avoid boxing the return from <see cref="NonReentrantLock.DisposableWait"/>, this type must be public. 245private readonly NonReentrantLock _semaphore; 247public SemaphoreDisposer(NonReentrantLock semaphore)
Shared\TestHooks\AsynchronousOperationListener.cs (1)
18private readonly NonReentrantLock _gate = new();
Utilities\Documentation\XmlDocumentationProvider.cs (1)
24private readonly NonReentrantLock _gate = new();
Workspace\Host\Metadata\MetadataReferenceCache.cs (1)
44private readonly NonReentrantLock _gate = new();
Workspace\Solution\ProjectDependencyGraph.cs (1)
38private readonly NonReentrantLock _dataLock = new();
Workspace\Solution\SolutionState.cs (3)
1610private NonReentrantLock? _stateLockBackingField; 1611private NonReentrantLock StateLock 1616return LazyInitializer.EnsureInitialized(ref _stateLockBackingField, NonReentrantLock.Factory)!;
Workspace\Solution\WeaklyCachedRecoverableValueSource.cs (1)
24private static readonly NonReentrantLock s_taskGuard = new();
Workspace\Workspace.cs (1)
46private readonly NonReentrantLock _stateLock = new(useThisInstanceForSynchronization: true);
Microsoft.CodeAnalysis.Workspaces.MSBuild (3)
MSBuild\MSBuildProjectLoader.cs (1)
31private readonly NonReentrantLock _dataGuard = new();
MSBuild\MSBuildWorkspace.cs (1)
32private readonly NonReentrantLock _serializationLock = new();
MSBuild\ProjectFile\ProjectFileLoaderRegistry.cs (1)
19private readonly NonReentrantLock _dataGuard;
Microsoft.VisualStudio.LanguageServices.Implementation (1)
CodeModel\ProjectCodeModel.cs (1)
23private readonly NonReentrantLock _guard = new NonReentrantLock();