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
Copy file name to clipboardExpand all lines: parallel/fanout.go
-2Lines changed: 0 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -12,8 +12,6 @@ NewFanOutStep creates a pipeline step that runs nested pipelines in their own Go
12
12
The function provided as PipelineSupplier is expected to close the given channel when no more pipelines should be executed, otherwise this step blocks forever.
13
13
The step waits until all pipelines are finished.
14
14
If the given ResultHandler is non-nil it will be called after all pipelines were run, otherwise the step is considered successful.
15
-
The given pipelines have to define their own context.Context, it's not passed "down" from parent pipeline.
16
-
However, The context.Context for the ResultHandler will be the one from parent pipeline.
@@ -116,6 +104,9 @@ func (p *Pipeline) Run() Result {
116
104
}
117
105
118
106
// RunWithContext is like Run but with a given context.Context.
107
+
// Upon cancellation of the context, the pipeline does not terminate a currently running step, instead it skips the remaining steps in the execution order.
108
+
// The context is passed to each Step.F and each Step may need to listen to the context cancellation event to truly cancel a long-running step.
109
+
// If the pipeline gets canceled, Result.IsCanceled returns true and Result.Err contains the context's error.
119
110
func (p*Pipeline) RunWithContext(ctx context.Context) Result {
0 commit comments