未验证 提交 7870b4ae 编写于 作者: T Tomáš Matoušek 提交者: GitHub

Remove Wait (#43752)

上级 fe97c06f
......@@ -216,21 +216,6 @@ private void UnregisterGlobalOperationNotifications()
globalOperationService.Started -= OnGlobalOperationStarted;
globalOperationService.Stopped -= OnGlobalOperationStopped;
}
Task localTask;
lock (_globalNotificationsGate)
{
// Unilaterally transition us to the finished state. Once we're finished
// we cannot start or stop anymore.
_globalNotificationsTask = _globalNotificationsTask.ContinueWith(
_ => GlobalNotificationState.Finished, CancellationToken.None, TaskContinuationOptions.None, TaskScheduler.Default);
localTask = _globalNotificationsTask;
}
// Have to wait for all the notifications to make it to the OOP side so we keep
// it in a consistent state. Also, if we don't do this, our _rpc object will
// get disposed while we're remoting over the messages to the oop side.
localTask.Wait();
}
private void OnGlobalOperationStarted(object sender, EventArgs e)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册