Description
My code deadlocks when working with AsyncSeq pipeline.
Repro steps
Code example:
[1;2;3]
|> AsyncSeq.ofSeq
|> AsyncSeq.groupBy (fun x -> x)
|> AsyncSeq.mapAsync (fun (key, gr) -> async {
let! length = AsyncSeq.length gr
return (key, length)
})
|> AsyncSeq.toBlockingSeq
Expected behavior
No deadlock, or some xml-doc remarks with the warnings of such possibility, if this is by design.
Known workarounds
It looks like I have to eagerly enumerate the sequence, so all groups get resolved
Related information
- Operating system Win 10
- .NET Runtime: 5.0.100