diff options
Diffstat (limited to 'static_pool.go')
-rw-r--r-- | static_pool.go | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/static_pool.go b/static_pool.go index b0f50c6f..c4895bf0 100644 --- a/static_pool.go +++ b/static_pool.go @@ -70,8 +70,8 @@ func NewPool(cmd func() *exec.Cmd, factory Factory, cfg Config) (*StaticPool, er return p, nil } -// Observe attaches pool event watcher. -func (p *StaticPool) Observe(o func(event int, w *Worker, ctx interface{})) { +// Report attaches pool event watcher. +func (p *StaticPool) Report(o func(event int, w *Worker, ctx interface{})) { p.observer = o } @@ -166,7 +166,7 @@ func (p *StaticPool) allocateWorker() (w *Worker, err error) { } } -// replaces dead or expired worker with new instance +// replaceWorker replaces dead or expired worker with new instance. func (p *StaticPool) replaceWorker(w *Worker, caused interface{}) { go p.destroyWorker(w) @@ -182,7 +182,7 @@ func (p *StaticPool) replaceWorker(w *Worker, caused interface{}) { } } -// destroy and remove worker from the pool. +// destroyWorker destroys workers and removes it from the pool. func (p *StaticPool) destroyWorker(w *Worker) { p.throw(EventDestruct, w, nil) |