From 1a30695c257deb87783dcd5399d386f4431dbfba Mon Sep 17 00:00:00 2001 From: Jimmy Byrd Date: Sat, 11 Mar 2023 14:30:17 -0500 Subject: [PATCH] Fixes ThreadPool Exhaustion with ProgressListener (#1070) --- src/FsAutoComplete/LspServers/FSharpLspClient.fs | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/FsAutoComplete/LspServers/FSharpLspClient.fs b/src/FsAutoComplete/LspServers/FSharpLspClient.fs index 2bebff8bb..2ddbce748 100644 --- a/src/FsAutoComplete/LspServers/FSharpLspClient.fs +++ b/src/FsAutoComplete/LspServers/FSharpLspClient.fs @@ -219,7 +219,7 @@ type ProgressListener(lspClient: FSharpLspClient, traceNamespace: string array) | None -> // if we don't get an event in 250 ms just loop again so we can analyze inflightEvents () - | Some(action, activity: Activity, reply: AsyncReplyChannel) -> + | Some(action, activity: Activity) -> match action with | "start" -> @@ -258,17 +258,14 @@ type ProgressListener(lspClient: FSharpLspClient, traceNamespace: string array) | _ -> () - reply.Reply() }) let shouldListenTo (act: ActivitySource) = act.Name = Tracing.fscServiceName - let activityStarted (act: Activity) = - mbp.PostAndReply(fun reply -> "start", act, reply) + let activityStarted (act: Activity) = mbp.Post("start", act) - let activityStopped (act: Activity) = - mbp.PostAndReply(fun reply -> "stop", act, reply) + let activityStopped (act: Activity) = mbp.Post("stop", act) let listener = new ActivityListener(