Closed
Description
It is currently quite a pain to implement cancellation passing explicitly. As has been said in several issues already, we need to support this on each member to do it properly. Plus we will need overloads:
- Each method taking a
TaskSeq
should also seamlessly take aConfiguredCancelableAsyncEnumerable<_>
, which is available in .NET Standard 2.1. This would solve SupportConfiguredCancelableAsyncEnumerable<'T>
#167, reported by @xperiandri (PS: to prevent the surface area to blow up, I will check ifofCancelable/toCancelable
functions would serve the same purpose). - Each method currently with the
Async
prefix should be able to take aTask
(as they can, currently), anAsync
and aValueTask
. Writing functions likeiterAsync
,iterWithTask
,iterWithValueTask
etc is going to be too painful long-run. - Each method should have an optional cancellation token argument as their last argument (?), so that piping into the functions is still possible, but it will default to no cancellation token. Only members that consume the task sequence should get a cancellation token argument.