From a20b263b9ebe8fe8782979d933090cc946aa0b34 Mon Sep 17 00:00:00 2001 From: Dmitry Krylov Date: Tue, 4 Jan 2022 15:44:33 +0300 Subject: [PATCH] Added Stop/WaitRunning methods --- worker/worker.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/worker/worker.go b/worker/worker.go index be4a657..f00fb9b 100644 --- a/worker/worker.go +++ b/worker/worker.go @@ -226,7 +226,10 @@ func (worker *Worker) customeHandler(inpack *inPack) { func (worker *Worker) Stop() { // Set stopped flag worker.stopped = true +} +// Wait for completeness serving +func (worker *Worker) WaitRunning() { // Wait for all the running activities has stopped worker.active.Wait() }