summaryrefslogtreecommitdiff
path: root/static_pool.go
diff options
context:
space:
mode:
authorWolfy-J <[email protected]>2020-10-26 21:28:11 +0300
committerWolfy-J <[email protected]>2020-10-26 21:28:11 +0300
commit9d2de5e46110c07eceb87dcfde3af9b6a6c4a76c (patch)
treee17593c4320f004b5eb7b1321a5f6bcb538b34cc /static_pool.go
parent722584b153c009612ccbaf1fb7a9911f7afae476 (diff)
- lazy load test
Diffstat (limited to 'static_pool.go')
-rwxr-xr-xstatic_pool.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/static_pool.go b/static_pool.go
index 4ecbdd41..2905742b 100755
--- a/static_pool.go
+++ b/static_pool.go
@@ -43,6 +43,10 @@ type StaticPool struct {
func NewPool(ctx context.Context, cmd func() *exec.Cmd, factory Factory, cfg Config) (Pool, error) {
cfg.InitDefaults()
+ if cfg.HeavyLoad {
+ cfg.NumWorkers = 0
+ }
+
p := &StaticPool{
cfg: cfg,
cmd: cmd,