FSharp.Control.AsyncSeq
FSharp.Control.AsyncSeq copied to clipboard
AsyncSeq deadlocks in Blazor WASM environment
Description
When calling AsyncSeq.ofAsyncEnum the thread becomes deadlocked and the app grinds to a halt
Please provide the steps required to reproduce the problem
Following code called from an async method in a Blazor WASM app (eg OnInitializedAsync())
printfn "Starting length print"
let! len = AsyncSeq.init 10 id |> AsyncSeq.toAsyncEnum |> AsyncSeq.ofAsyncEnum |> AsyncSeq.length
printfn "Length is:%i" len
Expected behavior
Don't eat my thread, it is the only one I have
Known workarounds
Grabbing the AsyncEnumerator and iterating over that..ugh
Interesting, apparently you are writing a function in f# and calling it in blazor, can I please see the function in f#
Here is a repo Run the app and index page will deadlock