summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--supervisor_pool.go (renamed from pool_watcher.go)8
1 files changed, 8 insertions, 0 deletions
diff --git a/pool_watcher.go b/supervisor_pool.go
index 6eb614dc..e63b4a59 100644
--- a/pool_watcher.go
+++ b/supervisor_pool.go
@@ -8,6 +8,14 @@ import (
const MB = 1024 * 1024
+type SupervisedPool interface {
+ Pool
+
+ // ExecWithContext provides the ability to execute with time deadline. Attention, worker will be destroyed if context
+ // deadline reached.
+ ExecWithContext(ctx context.Context, rqs Payload) (Payload, error)
+}
+
type supervisedPool struct {
cfg SupervisorConfig
events *util.EventHandler