mirror of
https://gitea.com/gitea/act_runner.git
synced 2026-05-13 19:33:23 +02:00
Return if executors length is zero in ParallelExecutor
This commit is contained in:
@@ -98,6 +98,10 @@ func NewErrorExecutor(err error) Executor {
|
||||
// NewParallelExecutor creates a new executor from a parallel of other executors
|
||||
func NewParallelExecutor(parallel int, executors ...Executor) Executor {
|
||||
return func(ctx context.Context) error {
|
||||
if len(executors) == 0 {
|
||||
return nil
|
||||
}
|
||||
|
||||
work := make(chan Executor, len(executors))
|
||||
errs := make(chan error, len(executors))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user