Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
lwm1986
roslyn
提交
e89c14b6
R
roslyn
项目概览
lwm1986
/
roslyn
与 Fork 源项目一致
从无法访问的项目Fork
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
R
roslyn
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
e89c14b6
编写于
12月 13, 2018
作者:
S
Sam Harwell
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Force cancellation if switching to UI thread completed after cancellation request
上级
6d88f91c
变更
10
隐藏空白更改
内联
并排
Showing
10 changed file
with
22 addition
and
0 deletion
+22
-0
src/EditorFeatures/Core.Wpf/InlineRename/InlineRenameSession.cs
...itorFeatures/Core.Wpf/InlineRename/InlineRenameSession.cs
+4
-0
src/EditorFeatures/Core/GoToDefinition/AbstractGoToSymbolService.cs
...Features/Core/GoToDefinition/AbstractGoToSymbolService.cs
+1
-0
src/EditorFeatures/Core/Implementation/CodeFixes/CodeFixService.cs
...rFeatures/Core/Implementation/CodeFixes/CodeFixService.cs
+1
-0
src/EditorFeatures/Core/Implementation/IntelliSense/ModelComputation.cs
...ures/Core/Implementation/IntelliSense/ModelComputation.cs
+1
-0
src/EditorFeatures/Core/Implementation/NavigationBar/NavigationBarController_ModelComputation.cs
...NavigationBar/NavigationBarController_ModelComputation.cs
+2
-0
src/EditorFeatures/Core/Implementation/RenameTracking/RenameTrackingTaggerProvider.TrackingSession.cs
...eTracking/RenameTrackingTaggerProvider.TrackingSession.cs
+3
-0
src/EditorFeatures/Core/Shared/Utilities/ForegroundThreadAffinitizedObject.cs
...ore/Shared/Utilities/ForegroundThreadAffinitizedObject.cs
+2
-0
src/VisualStudio/CSharp/Impl/EventHookup/EventHookupSessionManager_EventHookupSession.cs
...entHookup/EventHookupSessionManager_EventHookupSession.cs
+2
-0
src/VisualStudio/Core/Def/Implementation/DesignerAttribute/DesignerAttributeIncrementalAnalyzer.cs
...DesignerAttribute/DesignerAttributeIncrementalAnalyzer.cs
+2
-0
src/VisualStudio/Core/Def/Packaging/PackageInstallerServiceFactory.cs
...udio/Core/Def/Packaging/PackageInstallerServiceFactory.cs
+4
-0
未找到文件。
src/EditorFeatures/Core.Wpf/InlineRename/InlineRenameSession.cs
浏览文件 @
e89c14b6
...
...
@@ -269,6 +269,8 @@ private void UpdateReferenceLocationsTask(Task<IInlineRenameLocationSet> allRena
async
t
=>
{
await
ThreadingContext
.
JoinableTaskFactory
.
SwitchToMainThreadAsync
(
alwaysYield
:
true
,
_cancellationTokenSource
.
Token
);
_cancellationTokenSource
.
Token
.
ThrowIfCancellationRequested
();
RaiseSessionSpansUpdated
(
t
.
Result
.
Locations
.
ToImmutableArray
());
},
_cancellationTokenSource
.
Token
,
...
...
@@ -513,6 +515,8 @@ private void QueueApplyReplacements()
async
t
=>
{
await
ThreadingContext
.
JoinableTaskFactory
.
SwitchToMainThreadAsync
(
alwaysYield
:
true
,
_conflictResolutionTaskCancellationSource
.
Token
);
_conflictResolutionTaskCancellationSource
.
Token
.
ThrowIfCancellationRequested
();
ApplyReplacements
(
t
.
Result
.
replacementInfo
,
t
.
Result
.
mergeResult
,
_conflictResolutionTaskCancellationSource
.
Token
);
},
_conflictResolutionTaskCancellationSource
.
Token
,
...
...
src/EditorFeatures/Core/GoToDefinition/AbstractGoToSymbolService.cs
浏览文件 @
e89c14b6
...
...
@@ -36,6 +36,7 @@ public async Task GetSymbolsAsync(GoToSymbolContext context)
// This means we have to query for "third party navigation", from
// XAML, etc. That call has to be done on the UI thread.
await
ThreadingContext
.
JoinableTaskFactory
.
SwitchToMainThreadAsync
(
alwaysYield
:
true
,
cancellationToken
);
cancellationToken
.
ThrowIfCancellationRequested
();
var
definitions
=
GoToDefinitionHelpers
.
GetDefinitions
(
symbol
,
document
.
Project
,
thirdPartyNavigationAllowed
:
true
,
cancellationToken
)
.
WhereAsArray
(
d
=>
d
.
CanNavigateTo
(
document
.
Project
.
Solution
.
Workspace
));
...
...
src/EditorFeatures/Core/Implementation/CodeFixes/CodeFixService.cs
浏览文件 @
e89c14b6
...
...
@@ -522,6 +522,7 @@ private async Task<IEnumerable<Diagnostic>> GetProjectDiagnosticsAsync(Project p
// Have to see if this fix is still applicable. Jump to the foreground thread
// to make that check.
await
ThreadingContext
.
JoinableTaskFactory
.
SwitchToMainThreadAsync
(
alwaysYield
:
true
,
cancellationToken
);
cancellationToken
.
ThrowIfCancellationRequested
();
var
applicable
=
fix
.
Action
.
IsApplicable
(
document
.
Project
.
Solution
.
Workspace
);
...
...
src/EditorFeatures/Core/Implementation/IntelliSense/ModelComputation.cs
浏览文件 @
e89c14b6
...
...
@@ -148,6 +148,7 @@ public virtual void Stop()
async
tasks
=>
{
await
ThreadingContext
.
JoinableTaskFactory
.
SwitchToMainThreadAsync
(
alwaysYield
:
true
,
_stopCancellationToken
);
_stopCancellationToken
.
ThrowIfCancellationRequested
();
if
(
tasks
.
All
(
t
=>
t
.
Status
==
TaskStatus
.
RanToCompletion
))
{
...
...
src/EditorFeatures/Core/Implementation/NavigationBar/NavigationBarController_ModelComputation.cs
浏览文件 @
e89c14b6
...
...
@@ -145,6 +145,8 @@ private void StartSelectedItemUpdateTask(int delay, bool updateUIWhenDone)
async
t
=>
{
await
ThreadingContext
.
JoinableTaskFactory
.
SwitchToMainThreadAsync
(
alwaysYield
:
true
,
cancellationToken
);
cancellationToken
.
ThrowIfCancellationRequested
();
PushSelectedItemsToPresenter
(
t
.
Result
);
},
cancellationToken
,
...
...
src/EditorFeatures/Core/Implementation/RenameTracking/RenameTrackingTaggerProvider.TrackingSession.cs
浏览文件 @
e89c14b6
...
...
@@ -77,6 +77,8 @@ public TrackingSession(StateMachine stateMachine, SnapshotSpan snapshotSpan, IAs
async
t
=>
{
await
ThreadingContext
.
JoinableTaskFactory
.
SwitchToMainThreadAsync
(
alwaysYield
:
true
,
_cancellationToken
);
_cancellationToken
.
ThrowIfCancellationRequested
();
stateMachine
.
UpdateTrackingSessionIfRenamable
();
},
_cancellationToken
,
...
...
@@ -103,6 +105,7 @@ private void QueueUpdateToStateMachine(StateMachine stateMachine, Task task)
task
.
SafeContinueWithFromAsync
(
async
t
=>
{
await
ThreadingContext
.
JoinableTaskFactory
.
SwitchToMainThreadAsync
(
alwaysYield
:
true
,
_cancellationToken
);
_cancellationToken
.
ThrowIfCancellationRequested
();
if
(
_isRenamableIdentifierTask
.
Result
!=
TriggerIdentifierKind
.
NotRenamable
)
{
...
...
src/EditorFeatures/Core/Shared/Utilities/ForegroundThreadAffinitizedObject.cs
浏览文件 @
e89c14b6
...
...
@@ -87,6 +87,8 @@ public Task InvokeBelowInputPriorityAsync(Action action, CancellationToken cance
async
()
=>
{
await
ThreadingContext
.
JoinableTaskFactory
.
SwitchToMainThreadAsync
(
cancellationToken
);
cancellationToken
.
ThrowIfCancellationRequested
();
action
();
},
cancellationToken
,
...
...
src/VisualStudio/CSharp/Impl/EventHookup/EventHookupSessionManager_EventHookupSession.cs
浏览文件 @
e89c14b6
...
...
@@ -116,6 +116,8 @@ public void Cancel()
async
t
=>
{
await
ThreadingContext
.
JoinableTaskFactory
.
SwitchToMainThreadAsync
(
alwaysYield
:
true
,
_cancellationTokenSource
.
Token
);
_cancellationTokenSource
.
Token
.
ThrowIfCancellationRequested
();
if
(
t
.
Result
!=
null
)
{
commandHandler
.
EventHookupSessionManager
.
EventHookupFoundInSession
(
this
);
...
...
src/VisualStudio/Core/Def/Implementation/DesignerAttribute/DesignerAttributeIncrementalAnalyzer.cs
浏览文件 @
e89c14b6
...
...
@@ -145,6 +145,8 @@ private async Task<bool> IsCpsProjectAsync(Project project, CancellationToken ca
var
vsWorkspace
=
project
.
Solution
.
Workspace
as
VisualStudioWorkspaceImpl
;
await
ThreadingContext
.
JoinableTaskFactory
.
SwitchToMainThreadAsync
(
alwaysYield
:
true
,
cancellationToken
);
cancellationToken
.
ThrowIfCancellationRequested
();
var
cps
=
vsWorkspace
?.
IsCPSProject
(
project
)
==
true
;
// The remainder of this method does not need to execute on the UI thread, but it's pointless to force a
...
...
src/VisualStudio/Core/Def/Packaging/PackageInstallerServiceFactory.cs
浏览文件 @
e89c14b6
...
...
@@ -371,6 +371,8 @@ private void OnWorkspaceChanged(object sender, WorkspaceChangeEventArgs e)
async
_
=>
{
await
ThreadingContext
.
JoinableTaskFactory
.
SwitchToMainThreadAsync
(
alwaysYield
:
true
,
cancellationToken
);
cancellationToken
.
ThrowIfCancellationRequested
();
ProcessBatchedChangesOnForeground
(
cancellationToken
);
},
cancellationToken
,
...
...
@@ -414,6 +416,8 @@ private void ProcessBatchedChangesOnForeground(CancellationToken cancellationTok
async
()
=>
{
await
ThreadingContext
.
JoinableTaskFactory
.
SwitchToMainThreadAsync
(
cancellationToken
);
cancellationToken
.
ThrowIfCancellationRequested
();
ProcessBatchedChangesOnForeground
(
cancellationToken
);
},
cancellationToken
,
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录