From 7eb675a031d751787b31bd6894c936e86b190ebf Mon Sep 17 00:00:00 2001 From: Valery Piashchynski Date: Tue, 10 Nov 2020 14:45:59 +0300 Subject: Pool options, allocator --- worker_watcher.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'worker_watcher.go') diff --git a/worker_watcher.go b/worker_watcher.go index 3a89554d..84be44f2 100755 --- a/worker_watcher.go +++ b/worker_watcher.go @@ -84,7 +84,7 @@ type WorkerWatcher interface { } // workerCreateFunc can be nil, but in that case, dead stack will not be replaced -func newWorkerWatcher(allocator func(args ...interface{}) (WorkerBase, error), numWorkers int64, events *util.EventHandler) *workerWatcher { +func newWorkerWatcher(allocator Allocator, numWorkers int64, events util.EventsHandler) WorkerWatcher { ww := &workerWatcher{ stack: NewWorkersStack(), allocator: allocator, @@ -99,10 +99,10 @@ func newWorkerWatcher(allocator func(args ...interface{}) (WorkerBase, error), n type workerWatcher struct { mutex sync.RWMutex stack *Stack - allocator func(args ...interface{}) (WorkerBase, error) + allocator Allocator initialNumWorkers int64 actualNumWorkers int64 - events *util.EventHandler + events util.EventsHandler } func (ww *workerWatcher) AddToWatch(ctx context.Context, workers []WorkerBase) error { -- cgit v1.2.3