aboutsummaryrefslogtreecommitdiff
path: root/src/lanes.lua
diff options
context:
space:
mode:
Diffstat (limited to 'src/lanes.lua')
-rw-r--r--src/lanes.lua14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/lanes.lua b/src/lanes.lua
index bd94a14..3ee959c 100644
--- a/src/lanes.lua
+++ b/src/lanes.lua
@@ -96,6 +96,7 @@ local default_params =
96 -- it looks also like LuaJIT allocator may not appreciate direct use of its allocator for other purposes than the VM operation 96 -- it looks also like LuaJIT allocator may not appreciate direct use of its allocator for other purposes than the VM operation
97 internal_allocator = isLuaJIT and "libc" or "allocator", 97 internal_allocator = isLuaJIT and "libc" or "allocator",
98 keepers_gc_threshold = -1, 98 keepers_gc_threshold = -1,
99 linda_wake_period = 'never',
99 nb_user_keepers = 0, 100 nb_user_keepers = 0,
100 on_state_create = nil, 101 on_state_create = nil,
101 shutdown_timeout = 0.25, 102 shutdown_timeout = 0.25,
@@ -141,6 +142,19 @@ local param_checkers =
141 end 142 end
142 return true 143 return true
143 end, 144 end,
145 linda_wake_period = function(val_)
146 -- linda_wake_period should be a number > 0, or the string 'never'
147 if val_ == 'never' then
148 return true
149 end
150 if type(val_) ~= "number" then
151 return nil, "not a number"
152 end
153 if val_ <= 0 then
154 return nil, "value out of range"
155 end
156 return true
157 end,
144 nb_user_keepers = function(val_) 158 nb_user_keepers = function(val_)
145 -- nb_user_keepers should be a number in [0,100] (so that nobody tries to run OOM by specifying a huge amount) 159 -- nb_user_keepers should be a number in [0,100] (so that nobody tries to run OOM by specifying a huge amount)
146 if type(val_) ~= "number" then 160 if type(val_) ~= "number" then