aboutsummaryrefslogtreecommitdiff
path: root/tests/linda_perf.lua
diff options
context:
space:
mode:
Diffstat (limited to 'tests/linda_perf.lua')
-rw-r--r--tests/linda_perf.lua8
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/linda_perf.lua b/tests/linda_perf.lua
index fff2670..87e0da7 100644
--- a/tests/linda_perf.lua
+++ b/tests/linda_perf.lua
@@ -3,24 +3,24 @@ lanes.configure()
3 3
4-- this lane eats items in the linda one by one 4-- this lane eats items in the linda one by one
5local eater = function( l, loop) 5local eater = function( l, loop)
6 local val, key = l:receive( "go") 6 local key, val = l:receive( "go")
7 for i = 1, loop do 7 for i = 1, loop do
8 local val, key = l:receive( "key") 8 local val, key = l:receive( "key")
9 --print( val) 9 --print( val)
10 end 10 end
11 -- print "loop is over" 11 -- print "loop is over"
12 val, key = l:receive( "done") 12 key, val = l:receive( "done")
13 -- print( val) 13 -- print( val)
14end 14end
15 15
16-- this lane eats items in the linda in batches 16-- this lane eats items in the linda in batches
17local batched = function( l, loop, batch) 17local batched = function( l, loop, batch)
18 local val, key = l:receive( "go") 18 local key, val = l:receive( "go")
19 for i = 1, loop/batch do 19 for i = 1, loop/batch do
20 l:receive( l.batched, "key", batch) 20 l:receive( l.batched, "key", batch)
21 end 21 end
22 print "loop is over" 22 print "loop is over"
23 val, key = l:receive( "done") 23 key, val = l:receive( "done")
24 print( val) 24 print( val)
25end 25end
26 26