diff options
Diffstat (limited to '')
-rw-r--r-- | src/lanes.lua | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/lanes.lua b/src/lanes.lua index f95dddf..caa8818 100644 --- a/src/lanes.lua +++ b/src/lanes.lua | |||
@@ -71,7 +71,7 @@ local default_params = | |||
71 | on_state_create = nil, | 71 | on_state_create = nil, |
72 | shutdown_timeout = 0.25, | 72 | shutdown_timeout = 0.25, |
73 | shutdown_mode = "hard", | 73 | shutdown_mode = "hard", |
74 | with_timers = true, | 74 | with_timers = false, |
75 | track_lanes = false, | 75 | track_lanes = false, |
76 | demote_full_userdata = nil, | 76 | demote_full_userdata = nil, |
77 | verbose_errors = false, | 77 | verbose_errors = false, |
@@ -626,7 +626,9 @@ end | |||
626 | -- PUBLIC LANES API | 626 | -- PUBLIC LANES API |
627 | local sleep = function(seconds_) | 627 | local sleep = function(seconds_) |
628 | seconds_ = seconds_ or 0.0 -- this causes false and nil to be a valid input, equivalent to 0.0, but that's ok | 628 | seconds_ = seconds_ or 0.0 -- this causes false and nil to be a valid input, equivalent to 0.0, but that's ok |
629 | if type(seconds_) ~= "number" then | 629 | if seconds_ == 'indefinitely' then |
630 | seconds_ = nil | ||
631 | elseif type(seconds_) ~= "number" then | ||
630 | error("invalid duration " .. string_format("%q", tostring(seconds_))) | 632 | error("invalid duration " .. string_format("%q", tostring(seconds_))) |
631 | end | 633 | end |
632 | -- receive data on a channel no-one ever sends anything, thus blocking for the specified duration | 634 | -- receive data on a channel no-one ever sends anything, thus blocking for the specified duration |