diff options
Diffstat (limited to '')
-rw-r--r-- | src/lanes.lua | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/lanes.lua b/src/lanes.lua index e7763b1..1c36b46 100644 --- a/src/lanes.lua +++ b/src/lanes.lua | |||
@@ -90,7 +90,7 @@ local isLuaJIT = (package and package.loaded.jit and jit.version) and true or fa | |||
90 | 90 | ||
91 | local default_params = | 91 | local default_params = |
92 | { | 92 | { |
93 | nb_keepers = 1, | 93 | nb_user_keepers = 0, |
94 | keepers_gc_threshold = -1, | 94 | keepers_gc_threshold = -1, |
95 | on_state_create = nil, | 95 | on_state_create = nil, |
96 | shutdown_timeout = 0.25, | 96 | shutdown_timeout = 0.25, |
@@ -114,9 +114,9 @@ end | |||
114 | 114 | ||
115 | local param_checkers = | 115 | local param_checkers = |
116 | { | 116 | { |
117 | nb_keepers = function(val_) | 117 | nb_user_keepers = function(val_) |
118 | -- nb_keepers should be a number in [1,100] (so that nobody tries to run OOM by specifying a huge amount) | 118 | -- nb_user_keepers should be a number in [0,100] (so that nobody tries to run OOM by specifying a huge amount) |
119 | return type(val_) == "number" and val_ > 0 and val_ <= 100 | 119 | return type(val_) == "number" and val_ >= 0 and val_ <= 100 |
120 | end, | 120 | end, |
121 | keepers_gc_threshold = function(val_) | 121 | keepers_gc_threshold = function(val_) |
122 | -- keepers_gc_threshold should be a number | 122 | -- keepers_gc_threshold should be a number |
@@ -176,7 +176,7 @@ local params_checker = function(settings_) | |||
176 | param = default_params[key] | 176 | param = default_params[key] |
177 | end | 177 | end |
178 | if not checker(param) then | 178 | if not checker(param) then |
179 | error("Bad " .. key .. ": " .. tostring(param), 2) | 179 | error("Bad parameter " .. key .. ": " .. tostring(param), 2) |
180 | end | 180 | end |
181 | settings[key] = param | 181 | settings[key] = param |
182 | end | 182 | end |