mirror of
https://gitea.com/gitea/act_runner.git
synced 2026-06-22 17:54:22 +02:00
Compare commits
1 Commits
v1.0.8
...
674f362c2a
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
674f362c2a |
@@ -98,6 +98,10 @@ func NewErrorExecutor(err error) Executor {
|
|||||||
// NewParallelExecutor creates a new executor from a parallel of other executors
|
// NewParallelExecutor creates a new executor from a parallel of other executors
|
||||||
func NewParallelExecutor(parallel int, executors ...Executor) Executor {
|
func NewParallelExecutor(parallel int, executors ...Executor) Executor {
|
||||||
return func(ctx context.Context) error {
|
return func(ctx context.Context) error {
|
||||||
|
if len(executors) == 0 {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
work := make(chan Executor, len(executors))
|
work := make(chan Executor, len(executors))
|
||||||
errs := make(chan error, len(executors))
|
errs := make(chan error, len(executors))
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user