summaryrefslogtreecommitdiff
path: root/pool/supervisor_pool.go
diff options
context:
space:
mode:
authorValery Piashchynski <[email protected]>2021-12-23 21:07:45 +0300
committerGitHub <[email protected]>2021-12-23 21:07:45 +0300
commit9cbb6be27ca0bd56eaa6db9a875830a8ce6110e8 (patch)
tree2ca6f5623ace05f083ef96c3b890c7bb00a7d7ee /pool/supervisor_pool.go
parent31112495808ae37f38f7b514de1f40b8b8a75238 (diff)
parent671fe2c81c4d1962e96b074f7ddead8dd07a0ea5 (diff)
[#879]: feat(pool): add `Reset` methodv2.6.3
Diffstat (limited to 'pool/supervisor_pool.go')
-rwxr-xr-xpool/supervisor_pool.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/pool/supervisor_pool.go b/pool/supervisor_pool.go
index 5f87c8a4..0502dc9a 100755
--- a/pool/supervisor_pool.go
+++ b/pool/supervisor_pool.go
@@ -51,6 +51,12 @@ func (sp *supervised) execWithTTL(_ context.Context, _ *payload.Payload) (*paylo
panic("used to satisfy pool interface")
}
+func (sp *supervised) Reset(ctx context.Context) error {
+ sp.mu.Lock()
+ defer sp.mu.Unlock()
+ return sp.pool.Reset(ctx)
+}
+
func (sp *supervised) Exec(rqs *payload.Payload) (*payload.Payload, error) {
const op = errors.Op("supervised_exec_with_context")
if sp.cfg.ExecTTL == 0 {