Added Stop/WaitRunning methods
This commit is contained in:
parent
d484cb3b96
commit
a20b263b9e
@ -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()
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user