Executes a single task in series with cancellation support.
The output type of the task
Cancellation options for the series execution
The task to execute
A CancellableHandle that resolves to the task's output
Executes two tasks in series, passing the output of the first task as input to the second.
The output type of the first task
The output type of the second task
Cancellation options for the series execution
The first task to execute
The second task to execute, receives T1 as input
A CancellableHandle that resolves to the second task's output
Executes three tasks in series, chaining their outputs as inputs to subsequent tasks.
The output type of the first task
The output type of the second task
The output type of the third task
A CancellableHandle that resolves to the third task's output
Executes four tasks in series, chaining their outputs as inputs to subsequent tasks.
The output type of the first task
The output type of the second task
The output type of the third task
The output type of the fourth task
Cancellation options for the series execution
The first task to execute
The second task to execute, receives T1 as input
The third task to execute, receives T2 as input
The fourth task to execute, receives T3 as input
A CancellableHandle that resolves to the fourth task's output
Executes multiple tasks in series, chaining their outputs as inputs to subsequent tasks. Each task receives the output of the previous task as input and a cancellation token. If any task is cancelled or throws an error, the entire series is aborted.
Tasks can be:
The series execution respects cancellation through the provided options and will:
Param: options
Cancellation options including signal, retry configuration, and timeout
Param: task1
The first task to execute (receives void as input)
Param: args
Additional tasks to execute in sequence
Returns
A CancellableHandle that resolves to the last task's output
Throws
If the series is cancelled during execution
Example
See