You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Documentation says there's a TaskSeq.toAsyncSeq function, but it does not exist #214
Can we implement this function? To prevent having a dependency on AsyncSeq, we probably need to create this function using SRTP, but it should be possible for users to convert to/from AsyncSeq.
@njlr thanks, as a quick look, this looks like a fine approach. However, we wouldn't want to have a dependency on AsyncSeq, that would be bad practice. Currently, this lib has zero dependencies and I like it that way.
The inverse is, as you've mentioned, easier, because the IAsyncEnumerable<'T> type is part of the .NET standard library. But the AsyncSeq library does not use a common interface that I could use.
I haven't looked at this for a while, I should probably get back into it.
Activity
njlr commentedon Oct 24, 2025
I needed this internally and came up with this implementation:
Any gotchas I have missed?
The dispose logic feels nasty.
Happy to send a PR.
abelbraaksma commentedon Nov 14, 2025
@njlr thanks, as a quick look, this looks like a fine approach. However, we wouldn't want to have a dependency on
AsyncSeq, that would be bad practice. Currently, this lib has zero dependencies and I like it that way.The inverse is, as you've mentioned, easier, because the
IAsyncEnumerable<'T>type is part of the .NET standard library. But theAsyncSeqlibrary does not use a common interface that I could use.I haven't looked at this for a while, I should probably get back into it.
njlr commentedon Nov 14, 2025
Happy to make a PR to https://github.com/fsprojects/FSharp.Control.AsyncSeq for this
Perhaps names reversed?
AsyncSeq.ofTaskSeqdsyme commentedon Mar 7, 2026
Latest versions of FSharp.Control.AsyncSeq use
So we have the somewhat strange but highly interoperable situation of
dsyme commentedon Mar 7, 2026
In short, no need to convert anything :)