Skip to content

Commit b02aa40

Browse files
committed
Add few TODOs to cleanup later
1 parent bc8a3ff commit b02aa40

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

static_pool.go

+2
Original file line numberDiff line numberDiff line change
@@ -188,6 +188,7 @@ func (p *StaticPool) Destroy() {
188188

189189
// finds free worker in a given time interval. Skips dead workers.
190190
func (p *StaticPool) allocateWorker() (w *Worker, err error) {
191+
// TODO loop counts upward, but its variable is bounded downward.
191192
for i := atomic.LoadInt64(&p.numDead); i >= 0; i++ {
192193
// this loop is required to skip issues with dead workers still being in a ring
193194
// (we know how many workers).
@@ -291,6 +292,7 @@ func (p *StaticPool) discardWorker(w *Worker, caused interface{}) {
291292
}
292293

293294
// destroyWorker destroys workers and removes it from the pool.
295+
// TODO caused unused
294296
func (p *StaticPool) destroyWorker(w *Worker, caused interface{}) {
295297
go func() {
296298
err := w.Stop()

0 commit comments

Comments
 (0)