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
Functions for working with TaskSeq and Channel? #415
I've implemented TaskSeq.toChannelAsync and TaskSeq.ofChannel and submitted a draft PR — [Repo Assist] feat: add TaskSeq.toChannelAsync and TaskSeq.ofChannel for System.Threading.Channels integration.
What was implemented:
// Write all elements of a TaskSeq to a ChannelWriter, then mark it complete.// Exceptions are propagated to the channel so downstream readers observe them.
TaskSeq.toChannelAsync : ChannelWriter<'T>-> TaskSeq<'T>-> Task
// Create a TaskSeq from a ChannelReader. Ends naturally when the channel// is completed and fully drained.
TaskSeq.ofChannel : ChannelReader<'T>-> TaskSeq<'T>
Implementation notes:
toChannelAsync uses while! e.MoveNextAsync() + writer.WriteAsync per element; calls writer.TryComplete() on success or writer.TryComplete(exn) on failure
ofChannel uses the idiomatic while! reader.WaitToReadAsync() + inner while reader.TryRead(&item) drain loop
One new dependency: System.Threading.Channels 8.0.0 (needed for netstandard2.1; built into net5.0+)
Activity
github-actions commentedon Apr 29, 2026
feat: add TaskSeq.toChannelAsync and TaskSeq.ofChannel for Channel in…
github-actions commentedon Apr 30, 2026
🤖 This is an automated response from Repo Assist.
I've implemented
TaskSeq.toChannelAsyncandTaskSeq.ofChanneland submitted a draft PR — [Repo Assist] feat: add TaskSeq.toChannelAsync and TaskSeq.ofChannel for System.Threading.Channels integration.What was implemented:
Implementation notes:
toChannelAsyncuseswhile! e.MoveNextAsync()+writer.WriteAsyncper element; callswriter.TryComplete()on success orwriter.TryComplete(exn)on failureofChanneluses the idiomaticwhile! reader.WaitToReadAsync()+ innerwhile reader.TryRead(&item)drain loopSystem.Threading.Channels 8.0.0(needed fornetstandard2.1; built intonet5.0+)