1 write to _threadingContext
Microsoft.VisualStudio.LanguageServices (1)
ProjectSystem\VisualStudioWorkspaceImpl.cs (1)
118_threadingContext = exportProvider.GetExportedValue<IThreadingContext>();
15 references to _threadingContext
Microsoft.VisualStudio.LanguageServices (15)
ProjectSystem\VisualStudioWorkspaceImpl.cs (12)
125_foregroundObject = new ForegroundThreadAffinitizedObject(_threadingContext); 143_threadingContext), 193await _threadingContext.JoinableTaskFactory.SwitchToMainThreadAsync(_threadingContext.DisposalToken); 205var memoryListener = await VirtualMemoryNotificationListener.CreateAsync(this, _threadingContext, asyncServiceProvider, _globalOptions, _threadingContext.DisposalToken).ConfigureAwait(true); 216await _threadingContext.JoinableTaskFactory.SwitchToMainThreadAsync(_threadingContext.DisposalToken); 304var document = _threadingContext.JoinableTaskFactory.Run(() => CurrentSolution.GetDocumentAsync(documentId, includeSourceGenerated: true).AsTask()); 648var mappedChanges = _threadingContext.JoinableTaskFactory.Run(() => GetMappedTextChanges(solutionChanges)); 1510_threadingContext.RunWithShutdownBlockAsync(async cancellationToken => 1519await _threadingContext.JoinableTaskFactory.SwitchToMainThreadAsync(alwaysYield: true, cancellationToken);
ProjectSystem\VisualStudioWorkspaceImpl.OpenFileTracker.cs (3)
68_foregroundAffinitization = new ForegroundThreadAffinitizedObject(workspace._threadingContext, assertIsForeground: true); 365if (_workspace._threadingContext.JoinableTaskContext.IsOnMainThread) 389await _workspace._threadingContext.JoinableTaskFactory.SwitchToMainThreadAsync();