summaryrefslogtreecommitdiff
path: root/pool.go
diff options
context:
space:
mode:
authorWolfy-J <[email protected]>2019-05-02 17:30:43 +0300
committerWolfy-J <[email protected]>2019-05-02 17:30:43 +0300
commit8fc464213c471ad79be88d9926d8f45b66a23ec0 (patch)
tree4072167f6ca3a2d4bd9ed56ff9c017c8ed79e16a /pool.go
parenta482d49122d92dd1cd82881ed221c55e5210e536 (diff)
removing workers in runtime
Diffstat (limited to 'pool.go')
-rw-r--r--pool.go7
1 files changed, 3 insertions, 4 deletions
diff --git a/pool.go b/pool.go
index 8372b4a6..2e59e154 100644
--- a/pool.go
+++ b/pool.go
@@ -22,10 +22,6 @@ const (
// Pool managed set of inner worker processes.
type Pool interface {
- // Watch enables worker watching (to destroy expired workers or workers which experience
- // memory leaks).
- Watch(w Watcher)
-
// Listen all caused events to attached watcher.
Listen(l func(event int, ctx interface{}))
@@ -35,6 +31,9 @@ type Pool interface {
// Workers returns worker list associated with the pool.
Workers() (workers []*Worker)
+ // Remove forces pool to destroy specific worker.
+ Remove(w *Worker, err error)
+
// Destroy all underlying workers (but let them to complete the task).
Destroy()
}