提交 86fcbe34 编写于 作者: D Don Syme 提交者: GitHub

prevent endless async loop on Receive (#3498)

* prevent endless async loop on Receive

* don't run update loop on ui thread forever

* Update LanguageService.fs
上级 83ce8851
......@@ -2084,9 +2084,8 @@ namespace Microsoft.FSharp.Control
// If it isn't, then create it, and go back to the start to
// check arrivals again.
match pulse with
| null ->
if timeout >= 0 || cancellationSupported then
ensurePulse() |> ignore
| null when timeout >= 0 || cancellationSupported ->
ensurePulse() |> ignore
return! processFirstArrival()
| _ ->
// Wait until we have been notified about a message. When that happens, rescan the arrivals
......
......@@ -352,7 +352,9 @@ and
while true do
let! siteProvider = inbox.Receive()
do! Async.SwitchToContext ctx
this.SetupProjectFile(siteProvider, this.Workspace, "SetupProjectsAfterSolutionOpen") }
this.SetupProjectFile(siteProvider, this.Workspace, "SetupProjectsAfterSolutionOpen")
do! Async.SwitchToThreadPool()
}
use _ = Events.SolutionEvents.OnAfterOpenProject |> Observable.subscribe ( fun args ->
match args.Hierarchy with
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册