summaryrefslogtreecommitdiff
path: root/static_pool.go
diff options
context:
space:
mode:
authorWolfy-J <[email protected]>2018-04-15 12:48:53 +0300
committerGitHub <[email protected]>2018-04-15 12:48:53 +0300
commit16fdc1e896278bf64550d508063d4cdf77409941 (patch)
tree76db075971f2fe683ed3bf643bbf097b47178a5a /static_pool.go
parentca63ec7aec2d7ba5d107d54091489612e4b12dc5 (diff)
parente2c1c66d7a35a9c60a4f05126691242068ebb589 (diff)
Merge pull request #6 from spiral/develop
Develop
Diffstat (limited to 'static_pool.go')
-rw-r--r--static_pool.go8
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)