1 write to _threadingContext
Microsoft.VisualStudio.LanguageServices (1)
ProjectSystem\VisualStudioWorkspaceImpl.cs (1)
130_threadingContext = exportProvider.GetExportedValue<IThreadingContext>();
25 references to _threadingContext
Microsoft.VisualStudio.LanguageServices (25)
ProjectSystem\VisualStudioWorkspaceImpl.cs (15)
145this, FileChangeWatcher, CheckForAddedFileBeingOpenMaybeAsync, RemoveProjectFromMaps, _threadingContext.DisposalToken); 159_updateUIContextJoinableTasks = new JoinableTaskCollection(_threadingContext.JoinableTaskContext); 246var document = _threadingContext.JoinableTaskFactory.Run(() => CurrentSolution.GetDocumentAsync(documentId, includeSourceGenerated: true).AsTask()); 266if (!_threadingContext.JoinableTaskContext.IsOnMainThread) 318_threadingContext.ThrowIfNotOnUIThread(); 590var mappedChanges = _threadingContext.JoinableTaskFactory.Run(() => GetMappedTextChangesAsync(solutionChanges, CancellationToken.None)); 907var dte = _threadingContext.JoinableTaskFactory.Run(() => _asyncServiceProvider.GetServiceAsync<SDTE, EnvDTE.DTE>(_threadingContext.DisposalToken)); 1053if (!_threadingContext.JoinableTaskContext.IsOnMainThread) 1163this._threadingContext.ThrowIfNotOnUIThread(); 1368_threadingContext.ThrowIfNotOnUIThread(); 1492_threadingContext.ThrowIfNotOnUIThread(); 1588_threadingContext.RunWithShutdownBlockAsync(async cancellationToken => 1610var joinableTask = _threadingContext.JoinableTaskFactory.RunAsync(() => UpdateUIContextAsync(language, cancellationToken)); 1622await _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();