diff options
author | Valery Piashchynski <[email protected]> | 2020-09-21 13:09:43 +0300 |
---|---|---|
committer | Valery Piashchynski <[email protected]> | 2020-09-21 13:09:43 +0300 |
commit | b02aa40700946d90ce9d5d5c3ead78f427bce7bf (patch) | |
tree | 981ee8b71f3fe31ef6d73593a0a9b6ae0b189216 | |
parent | bc8a3ff724c425a31c2c50a7b5f093983ed792ef (diff) |
Add few TODOs to cleanup later
-rw-r--r-- | static_pool.go | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/static_pool.go b/static_pool.go index c7cc6517..c4b6f42d 100644 --- a/static_pool.go +++ b/static_pool.go @@ -188,6 +188,7 @@ func (p *StaticPool) Destroy() { // finds free worker in a given time interval. Skips dead workers. func (p *StaticPool) allocateWorker() (w *Worker, err error) { + // TODO loop counts upward, but its variable is bounded downward. for i := atomic.LoadInt64(&p.numDead); i >= 0; i++ { // this loop is required to skip issues with dead workers still being in a ring // (we know how many workers). @@ -291,6 +292,7 @@ func (p *StaticPool) discardWorker(w *Worker, caused interface{}) { } // destroyWorker destroys workers and removes it from the pool. +// TODO caused unused func (p *StaticPool) destroyWorker(w *Worker, caused interface{}) { go func() { err := w.Stop() |