Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions src/Workspaces/Remote/Core/ServiceDescriptor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,10 @@ protected override IJsonRpcMessageFormatter CreateFormatter()

protected override JsonRpcConnection CreateConnection(JsonRpc jsonRpc)
{
// The default synchronization context set by the base type is NonConcurrentSynchronizationContext, which means that all incoming calls
// would be processed sequentially, at least up until their first await. We generally don't have services that expect ordering in that specific way, so
// disable that, especially since we want CPU-bound operations to happen in parallel.
jsonRpc.SynchronizationContext = null;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this apply to all brokered service usages - or just devenv -> oop? (e.g. does this apply to vscode brokered services)

Copy link
Member Author

@jasonmalinowski jasonmalinowski Mar 12, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dibarbet As best I know, everything, VS Code included.

jsonRpc.CancelLocallyInvokedMethodsWhenConnectionIsClosed = true;
var connection = base.CreateConnection(jsonRpc);
connection.LocalRpcTargetOptions = s_jsonRpcTargetOptions;
Expand Down
Loading