Skip to content

Commit

Permalink
Fixes ThreadPool Exhaustion with ProgressListener (#1070)
Browse files Browse the repository at this point in the history
  • Loading branch information
TheAngryByrd authored Mar 11, 2023
1 parent f33887b commit 1a30695
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions src/FsAutoComplete/LspServers/FSharpLspClient.fs
Original file line number Diff line number Diff line change
Expand Up @@ -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<unit>) ->
| Some(action, activity: Activity) ->

match action with
| "start" ->
Expand Down Expand Up @@ -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(
Expand Down

0 comments on commit 1a30695

Please sign in to comment.