diff options
Diffstat (limited to 'src/lanes.lua')
-rw-r--r-- | src/lanes.lua | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/lanes.lua b/src/lanes.lua index 98f8c20..bd94a14 100644 --- a/src/lanes.lua +++ b/src/lanes.lua | |||
@@ -603,7 +603,6 @@ local configure_timers = function() | |||
603 | return next_wakeup -- may be 'nil' | 603 | return next_wakeup -- may be 'nil' |
604 | end -- check_timers() | 604 | end -- check_timers() |
605 | 605 | ||
606 | local timer_gateway_batched = timerLinda.batched | ||
607 | set_finalizer(function(err, stk) | 606 | set_finalizer(function(err, stk) |
608 | if err and type(err) ~= "userdata" then | 607 | if err and type(err) ~= "userdata" then |
609 | error("LanesTimer error: "..tostring(err)) | 608 | error("LanesTimer error: "..tostring(err)) |
@@ -628,7 +627,7 @@ local configure_timers = function() | |||
628 | 627 | ||
629 | if _timerKey == TGW_KEY then | 628 | if _timerKey == TGW_KEY then |
630 | assert(getmetatable(_what) == "Linda") -- '_what' should be a linda on which the client sets a timer | 629 | assert(getmetatable(_what) == "Linda") -- '_what' should be a linda on which the client sets a timer |
631 | local _, key, wakeup_at, period = timerLinda:receive(0, timer_gateway_batched, TGW_KEY, 3) | 630 | local _, key, wakeup_at, period = timerLinda:receive_batched(0, TGW_KEY, 3) |
632 | assert(key) | 631 | assert(key) |
633 | set_timer(_what, key, wakeup_at, period and period > 0 and period or nil) | 632 | set_timer(_what, key, wakeup_at, period and period > 0 and period or nil) |
634 | elseif _timerKey == TGW_QUERY then | 633 | elseif _timerKey == TGW_QUERY then |
@@ -758,7 +757,7 @@ local genlock = function(linda_, key_, N) | |||
758 | -- 'nil' timeout allows 'key_' to be numeric | 757 | -- 'nil' timeout allows 'key_' to be numeric |
759 | return linda_:send(timeout, key_, trues(M_)) -- suspends until been able to push them | 758 | return linda_:send(timeout, key_, trues(M_)) -- suspends until been able to push them |
760 | else | 759 | else |
761 | local _k, _v = linda_:receive(nil, linda_.batched, key_, -M_) | 760 | local _k, _v = linda_:receive_batched(nil, key_, -M_) |
762 | -- propagate cancel_error if we got it, else return true or false | 761 | -- propagate cancel_error if we got it, else return true or false |
763 | return (_v == cancel_error and _v) or (_k and true or false) | 762 | return (_v == cancel_error and _v) or (_k and true or false) |
764 | end | 763 | end |