提交 42202d8b 编写于 作者: S Sam Harwell

Ensure IServiceBroker is used on a background thread

上级 ffa4e6d2
......@@ -163,6 +163,9 @@ public override async ValueTask<RemoteServiceConnection<T>> CreateConnectionAsyn
var descriptor = ServiceDescriptors.GetServiceDescriptor(typeof(T), RemoteHostOptions.IsServiceHubProcess64Bit(_services));
// Make sure we are on the thread pool to avoid UI thread dependencies if external code uses ConfigureAwait(true)
await TaskScheduler.Default;
#pragma warning disable ISB001 // Dispose of proxies - BrokeredServiceConnection takes care of disposal
var proxy = await _serviceBroker.GetProxyAsync<T>(descriptor, options, cancellationToken).ConfigureAwait(false);
#pragma warning restore
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册