// LimitExecutor creates a new Executor with the given maximum number of goroutines that may run simultaneously.
LimitExecutor creates a new Executor with the given maximum number of goroutines that may run simultaneously.
// LimitExecutor creates a new Executor with the given maximum number of goroutines that may run simultaneously .
func LimitExecutor(limit int, executor Executor) *LimitingExecutor {
	if limit < 0 {
		panic(fmt.Errorf("limit may not be < 0 but was %d", limit))
	}
	return &LimitingExecutor{maxRunning: limit, executor: executor}
}
func LimitExecutor ( limit int , executor Executor ) * LimitingExecutor { if limit < 0 { panic ( fmt . Errorf ( " " , limit ) ) } return & LimitingExecutor { maxRunning : limit , executor : executor } }
LimitExecutor creates a new Executor with the given maximum number of goroutines that may run simultaneously.
LimitExecutor creates a new Executor with the given maximum number of goroutines that may run simultaneously .