From 1e689bdd7a0c0cde85f47091afcee7f292c4cafd Mon Sep 17 00:00:00 2001 From: Wolfy-J Date: Sun, 28 Jan 2018 18:20:30 +0300 Subject: cs --- README.md | 2 +- pool.go | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index abc59192..72de2688 100644 --- a/README.md +++ b/README.md @@ -17,8 +17,8 @@ Features: - automatic worker replacement and safe destruction - worker lifecycle management (create/allocate/destroy timeouts) - payload context +- control over max jobs per worker - protocol, worker and job level error management -- limit max worker executions - very fast (~250k calls per second on Ryzen 1700X over 16 threads) - works on Windows diff --git a/pool.go b/pool.go index 4c9f0b26..415c695e 100644 --- a/pool.go +++ b/pool.go @@ -95,7 +95,6 @@ func (p *Pool) Exec(rqs *Payload) (rsp *Payload, err error) { return nil, errors.Wrap(err, "unable to allocate worker") } - //todo: timeout rsp, err = w.Exec(rqs) if err != nil { @@ -165,6 +164,8 @@ func (p *Pool) replaceWorker(w *Worker, caused interface{}) { go p.destroyWorker(w) nw, _ := p.createWorker() + + // if unable to create, retry ? or report error p.free <- nw } @@ -207,7 +208,6 @@ func (p *Pool) createWorker() (*Worker, error) { log.Println(err) - //todo: automatic replace } }(w) -- cgit v1.2.3