提交 e6285746 编写于 作者: S Sam Bent

remove AppContext switch

上级 7d202439
......@@ -404,8 +404,7 @@ private void DisconnectHostedVisualOnAllChannels()
// Adding commands to a channel is not thread-safe,
// we must do the actual work on the same dispatcher thread
// where the connection happened.
if (CoreAppContextSwitches.HostVisualDisconnectsOnWrongThread ||
(channelDispatcher != null && channelDispatcher.CheckAccess()))
if (channelDispatcher != null && channelDispatcher.CheckAccess())
{
Disconnect(channel,
channelDispatcher,
......@@ -519,10 +518,7 @@ private bool DoPendingDisconnect(DUCE.Channel channel)
DUCE.ResourceHandle targetHandle,
DUCE.MultiChannelResource contentRoot)
{
if (!CoreAppContextSwitches.HostVisualDisconnectsOnWrongThread)
{
channelDispatcher.VerifyAccess();
}
channelDispatcher.VerifyAccess();
DUCE.CompositionNode.RemoveChild(
hostHandle,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册