fsprojects / FSharp.Control.TaskSeq

A computation expression and module for seamless working with IAsyncEnumerable<'T> as if it is just another sequence
MIT License
93 stars 8 forks source link

Fix issue #135 use `StartImmediateAsTask` instead of `StartAsTask` to prevent a thread hop #191

Closed abelbraaksma closed 1 year ago

abelbraaksma commented 1 year ago

Fixes #135

This brings our task-like behavior in line with the similar change in F# itself, see https://github.com/dotnet/fsharp/pull/14499 (and https://github.com/dotnet/fsharp/pull/14490.

We should probably have a look at these tests (https://github.com/dotnet/fsharp/commit/4054701c43f19e233458dd4c727aa9e212dd854e) and add some of these here as well to ensure we are properly propagating exceptions etc.