Update dependencies in benchmark

This commit is contained in:
Alejandro Durante
2021-12-26 10:40:19 -03:00
parent 61e1a00a76
commit f833392da4
4 changed files with 16 additions and 15 deletions
+3 -3
View File
@@ -16,8 +16,8 @@ const (
)
var (
// SubmitOnStoppedPoolError is thrown when attempting to submit a task to a pool that has been stopped
SubmitOnStoppedPoolError = errors.New("worker pool has been stopped and is no longer accepting tasks")
// ErrSubmitOnStoppedPool is thrown when attempting to submit a task to a pool that has been stopped
ErrSubmitOnStoppedPool = errors.New("worker pool has been stopped and is no longer accepting tasks")
)
// defaultPanicHandler is the default panic handler
@@ -226,7 +226,7 @@ func (p *WorkerPool) submit(task func(), mustSubmit bool) (submitted bool) {
if p.Stopped() {
// Pool is stopped and caller must submit the task
if mustSubmit {
panic(SubmitOnStoppedPoolError)
panic(ErrSubmitOnStoppedPool)
}
return false
}