summaryrefslogtreecommitdiff
path: root/static_pool.go
diff options
context:
space:
mode:
authorWolfy-J <[email protected]>2019-03-21 14:45:34 +0300
committerGitHub <[email protected]>2019-03-21 14:45:34 +0300
commit3c636b0397603b8019e1a2c95a4ce5424ff950cc (patch)
tree375fed7174d0d79644838197bfb23787e19823f0 /static_pool.go
parent210010ebe3bfafbf380a4f3a8439b087fba4a861 (diff)
Update static_pool.go
allow pool to finish slow tasks
Diffstat (limited to 'static_pool.go')
-rw-r--r--static_pool.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/static_pool.go b/static_pool.go
index be1a6f3b..c9473699 100644
--- a/static_pool.go
+++ b/static_pool.go
@@ -152,8 +152,8 @@ func (p *StaticPool) Destroy() {
atomic.AddInt32(&p.inDestroy, 1)
p.tmu.Lock()
- close(p.destroy)
p.tasks.Wait()
+ close(p.destroy)
p.tmu.Unlock()
var wg sync.WaitGroup