summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWolfy-J <[email protected]>2018-06-23 13:20:06 +0300
committerWolfy-J <[email protected]>2018-06-23 13:20:06 +0300
commitddf2ce2ca7d90d6cddf7d49e973ea4ec17f8477a (patch)
tree87f98b5124f75736bdbdd967940eeb2d99fc3b7b
parent5fc8f8198ee17734b292dc7bf3f534fd5957db07 (diff)
support for realtime error aggegration
-rw-r--r--static_pool.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/static_pool.go b/static_pool.go
index 79166197..ccd3f27a 100644
--- a/static_pool.go
+++ b/static_pool.go
@@ -84,11 +84,11 @@ func (p *StaticPool) Listen(l func(event int, ctx interface{})) {
p.lsn = l
- p.muw.RLock()
+ p.muw.Lock()
for _, w := range p.workers {
w.err.Listen(l)
}
- p.muw.RUnlock()
+ p.muw.Unlock()
}
// Config returns associated pool configuration. Immutable.
@@ -217,7 +217,7 @@ func (p *StaticPool) createWorker() (*Worker, error) {
if p.lsn != nil {
w.err.Listen(p.lsn)
}
- defer p.mul.Unlock()
+ p.mul.Unlock()
p.throw(EventWorkerConstruct, w)