diff options
Diffstat (limited to 'src/lanes.lua')
-rw-r--r-- | src/lanes.lua | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/lanes.lua b/src/lanes.lua index 49900f9..fd3d22b 100644 --- a/src/lanes.lua +++ b/src/lanes.lua | |||
@@ -73,6 +73,7 @@ lanes.configure = function( settings_) | |||
73 | keepers_gc_threshold = -1, | 73 | keepers_gc_threshold = -1, |
74 | on_state_create = nil, | 74 | on_state_create = nil, |
75 | shutdown_timeout = 0.25, | 75 | shutdown_timeout = 0.25, |
76 | shutdown_mode = "hard", | ||
76 | with_timers = true, | 77 | with_timers = true, |
77 | track_lanes = false, | 78 | track_lanes = false, |
78 | demote_full_userdata = nil, | 79 | demote_full_userdata = nil, |
@@ -113,6 +114,11 @@ lanes.configure = function( settings_) | |||
113 | -- shutdown_timeout should be a number >= 0 | 114 | -- shutdown_timeout should be a number >= 0 |
114 | return type( val_) == "number" and val_ >= 0 | 115 | return type( val_) == "number" and val_ >= 0 |
115 | end, | 116 | end, |
117 | shutdown_mode = function( val_) | ||
118 | local valid_hooks = { soft = true, hard = true, call = true, ret = true, line = true, count = true } | ||
119 | -- shutdown_mode should be a known hook mask | ||
120 | return valid_hooks[val_] | ||
121 | end, | ||
116 | track_lanes = boolean_param_checker, | 122 | track_lanes = boolean_param_checker, |
117 | demote_full_userdata = boolean_param_checker, | 123 | demote_full_userdata = boolean_param_checker, |
118 | verbose_errors = boolean_param_checker | 124 | verbose_errors = boolean_param_checker |
@@ -367,7 +373,6 @@ lanes.configure = function( settings_) | |||
367 | 373 | ||
368 | 374 | ||
369 | if settings.with_timers ~= false then | 375 | if settings.with_timers ~= false then |
370 | |||
371 | -- | 376 | -- |
372 | -- On first 'require "lanes"', a timer lane is spawned that will maintain | 377 | -- On first 'require "lanes"', a timer lane is spawned that will maintain |
373 | -- timer tables and sleep in between the timer events. All interaction with | 378 | -- timer tables and sleep in between the timer events. All interaction with |