1 write to _threadingContext
Microsoft.VisualStudio.LanguageServices (1)
ProjectSystem\VisualStudioWorkspaceImpl.cs (1)
126_threadingContext = exportProvider.GetExportedValue<IThreadingContext>();
25 references to _threadingContext
Microsoft.VisualStudio.LanguageServices (25)
ProjectSystem\VisualStudioWorkspaceImpl.cs (15)
141this, FileChangeWatcher, CheckForAddedFileBeingOpenMaybeAsync, RemoveProjectFromMaps, _threadingContext.DisposalToken); 155_updateUIContextJoinableTasks = new JoinableTaskCollection(_threadingContext.JoinableTaskContext); 242var document = _threadingContext.JoinableTaskFactory.Run(() => CurrentSolution.GetDocumentAsync(documentId, includeSourceGenerated: true).AsTask()); 262if (!_threadingContext.JoinableTaskContext.IsOnMainThread) 314_threadingContext.ThrowIfNotOnUIThread(); 586var mappedChanges = _threadingContext.JoinableTaskFactory.Run(() => GetMappedTextChangesAsync(solutionChanges, CancellationToken.None)); 903var dte = _threadingContext.JoinableTaskFactory.Run(() => _asyncServiceProvider.GetServiceAsync<SDTE, EnvDTE.DTE>(_threadingContext.DisposalToken)); 1049if (!_threadingContext.JoinableTaskContext.IsOnMainThread) 1159this._threadingContext.ThrowIfNotOnUIThread(); 1364_threadingContext.ThrowIfNotOnUIThread(); 1488_threadingContext.ThrowIfNotOnUIThread(); 1581_threadingContext.RunWithShutdownBlockAsync(async cancellationToken => 1603var joinableTask = _threadingContext.JoinableTaskFactory.RunAsync(() => UpdateUIContextAsync(language, cancellationToken)); 1615await _threadingContext.JoinableTaskFactory.SwitchToMainThreadAsync(alwaysYield: true, cancellationToken);
ProjectSystem\VisualStudioWorkspaceImpl.OpenFileTracker.cs (10)
96_workspace._threadingContext.ThrowIfNotOnUIThread(); 109_workspace._threadingContext.ThrowIfNotOnUIThread(); 131_workspace._threadingContext.ThrowIfNotOnUIThread(); 187_workspace._threadingContext.ThrowIfNotOnUIThread(); 258_workspace._threadingContext.ThrowIfNotOnUIThread(); 270_workspace._threadingContext.ThrowIfNotOnUIThread(); 292_workspace._threadingContext.ThrowIfNotOnUIThread(); 310_workspace._threadingContext.ThrowIfNotOnUIThread(); 359if (_workspace._threadingContext.JoinableTaskContext.IsOnMainThread) 393await _workspace._threadingContext.JoinableTaskFactory.SwitchToMainThreadAsync();