Golang_HomeWork/hw05_parallel_execution/run.go

16 lines
346 B
Go

package hw05_parallel_execution //nolint:golint,stylecheck
import (
"errors"
)
var ErrErrorsLimitExceeded = errors.New("errors limit exceeded")
type Task func() error
// Run starts tasks in N goroutines and stops its work when receiving M errors from tasks
func Run(tasks []Task, N int, M int) error {
// Place your code here
return nil
}