summaryrefslogtreecommitdiff
path: root/tests/linda_perf.lua
diff options
context:
space:
mode:
Diffstat (limited to 'tests/linda_perf.lua')
-rw-r--r--tests/linda_perf.lua5
1 files changed, 4 insertions, 1 deletions
diff --git a/tests/linda_perf.lua b/tests/linda_perf.lua
index 87e0da7..be582ce 100644
--- a/tests/linda_perf.lua
+++ b/tests/linda_perf.lua
@@ -1,6 +1,9 @@
1local lanes = require "lanes" 1local lanes = require "lanes"
2lanes.configure() 2lanes.configure()
3 3
4-- Lua 5.1/5.2 compatibility
5local table_unpack = unpack or table.unpack
6
4-- this lane eats items in the linda one by one 7-- this lane eats items in the linda one by one
5local eater = function( l, loop) 8local eater = function( l, loop)
6 local key, val = l:receive( "go") 9 local key, val = l:receive( "go")
@@ -131,7 +134,7 @@ local function ziva2( preloop, loop, batch)
131 end 134 end
132 -- create a function that can send several values in one shot 135 -- create a function that can send several values in one shot
133 batch_send = function() 136 batch_send = function()
134 l:send( "key", unpack( batch_values)) 137 l:send( "key", table_unpack( batch_values))
135 end 138 end
136 batch_read = function() 139 batch_read = function()
137 l:receive( l.batched, "key", batch) 140 l:receive( l.batched, "key", batch)