diff options
author | Wolfy-J <[email protected]> | 2018-09-23 15:50:57 +0300 |
---|---|---|
committer | Wolfy-J <[email protected]> | 2018-09-23 15:50:57 +0300 |
commit | eb64ebee3c77522202c5163513e7318bd630f8be (patch) | |
tree | def759b509dbd32569afc8229c8888fa6599e1bf /static_pool.go | |
parent | 0d826d29d27cdc83766ceb60c33444603f67ade1 (diff) |
task wait group protection added
Diffstat (limited to 'static_pool.go')
-rw-r--r-- | static_pool.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/static_pool.go b/static_pool.go index 432c9adc..be1a6f3b 100644 --- a/static_pool.go +++ b/static_pool.go @@ -150,9 +150,9 @@ func (p *StaticPool) Exec(rqs *Payload) (rsp *Payload, err error) { // Destroy all underlying workers (but let them to complete the task). func (p *StaticPool) Destroy() { atomic.AddInt32(&p.inDestroy, 1) - close(p.destroy) p.tmu.Lock() + close(p.destroy) p.tasks.Wait() p.tmu.Unlock() |