summaryrefslogtreecommitdiff
path: root/pool.go
diff options
context:
space:
mode:
authorWolfy-J <[email protected]>2020-10-26 21:12:46 +0300
committerWolfy-J <[email protected]>2020-10-26 21:12:46 +0300
commit6d3bd7d47aa9d08847eecfb241298f323aae05ca (patch)
treeceedc92534ed148de0560e6d32cbc12f0d7bb71c /pool.go
parent91cf918b30938129609323ded53e190385e019a6 (diff)
- lazy load test
Diffstat (limited to 'pool.go')
-rwxr-xr-xpool.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/pool.go b/pool.go
index bc57bcbd..de7e837d 100755
--- a/pool.go
+++ b/pool.go
@@ -75,6 +75,11 @@ type Config struct {
// worker handle as many tasks as it can.
MaxJobs int64
+ // Deferred flag enables slower working mode which inits empty worker ahead of every request. Useful to debug
+ // applications with heavy bootload phase. Do not use at production. It is also keeps pool without any workers
+ // until first request.
+ Deferred bool
+
// AllocateTimeout defines for how long pool will be waiting for a worker to
// be freed to handle the task. Defaults to 60s.
AllocateTimeout time.Duration