aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenoit Germain <benoit.germain@ubisoft.com>2025-03-14 14:53:09 +0100
committerBenoit Germain <benoit.germain@ubisoft.com>2025-03-14 14:53:09 +0100
commit512f4c0b46ea5cc359e673b7379cd81925863121 (patch)
tree1e72167d8d63f44109719db9643d4c0445b17d57
parent0aa030db022c57947afbae3b97038a403973e3cd (diff)
downloadlanes-master.tar.gz
lanes-master.tar.bz2
lanes-master.zip
Give a name to all lanes in the testsHEADmaster
Diffstat (limited to '')
-rw-r--r--deep_userdata_example/deeptest.lua1
-rw-r--r--tests/appendud.lua2
-rw-r--r--tests/atexit.lua4
-rw-r--r--tests/basic.lua24
-rw-r--r--tests/cancel.lua10
-rw-r--r--tests/cyclic.lua6
-rw-r--r--tests/ehynes.lua2
-rw-r--r--tests/error.lua2
-rw-r--r--tests/fibonacci.lua2
-rw-r--r--tests/finalizer.lua2
-rw-r--r--tests/func_is_string.lua6
-rw-r--r--tests/hangtest.lua2
-rw-r--r--tests/irayo_closure.lua2
-rw-r--r--tests/irayo_recursive.lua2
-rw-r--r--tests/keeper.lua2
-rw-r--r--tests/lanes_as_upvalue.lua2
-rw-r--r--tests/launchtest.lua2
-rw-r--r--tests/linda_perf.lua4
-rw-r--r--tests/manual_register.lua2
-rw-r--r--tests/nameof.lua2
-rw-r--r--tests/objects.lua2
-rw-r--r--tests/parallel_os_calls.lua16
-rw-r--r--tests/perftest.lua4
-rw-r--r--tests/pingpong.lua4
-rw-r--r--tests/protect_allocator.lua2
-rw-r--r--tests/protectproxy.lua2
-rw-r--r--tests/recursive.lua2
-rw-r--r--tests/require.lua4
-rw-r--r--tests/rupval.lua2
-rw-r--r--tests/tobeclosed.lua4
-rw-r--r--tests/track_lanes.lua2
-rw-r--r--unit_tests/embedded_tests.cpp2
-rw-r--r--unit_tests/init_and_shutdown.cpp1
-rw-r--r--unit_tests/lane_tests.cpp2
-rw-r--r--unit_tests/scripts/coro/basics.lua2
-rw-r--r--unit_tests/scripts/lane/cooperative_shutdown.lua6
-rw-r--r--unit_tests/scripts/lane/stdlib_naming.lua2
-rw-r--r--unit_tests/scripts/lane/tasking_basic.lua2
-rw-r--r--unit_tests/scripts/lane/tasking_cancelling.lua8
-rw-r--r--unit_tests/scripts/lane/tasking_comms_criss_cross.lua2
-rw-r--r--unit_tests/scripts/lane/tasking_communications.lua2
-rw-r--r--unit_tests/scripts/lane/tasking_error.lua2
-rw-r--r--unit_tests/scripts/lane/tasking_join_test.lua2
-rw-r--r--unit_tests/scripts/lane/tasking_send_receive_code.lua2
-rw-r--r--unit_tests/scripts/lane/uncooperative_shutdown.lua2
45 files changed, 82 insertions, 80 deletions
diff --git a/deep_userdata_example/deeptest.lua b/deep_userdata_example/deeptest.lua
index 6ef4b74..37136cd 100644
--- a/deep_userdata_example/deeptest.lua
+++ b/deep_userdata_example/deeptest.lua
@@ -82,6 +82,7 @@ local performTest = function( obj_)
82 local g = lanes.gen( 82 local g = lanes.gen(
83 "package" 83 "package"
84 , { 84 , {
85 name = 'auto',
85 required = { "deep_userdata_example"} -- we will transfer userdata created by this module, so we need to make this lane aware of it 86 required = { "deep_userdata_example"} -- we will transfer userdata created by this module, so we need to make this lane aware of it
86 } 87 }
87 , function( arg_, t_) 88 , function( arg_, t_)
diff --git a/tests/appendud.lua b/tests/appendud.lua
index f510c8b..f6f99c1 100644
--- a/tests/appendud.lua
+++ b/tests/appendud.lua
@@ -42,7 +42,7 @@ function appendud(tab, ud)
42 -- ('tab' is passed over lanes by value, not by reference) 42 -- ('tab' is passed over lanes by value, not by reference)
43end 43end
44 44
45local t,err= lanes.gen( "base,io", appendud )( _tab, _ud ) -- create & launch a thread 45local t,err= lanes.gen( "base,io", { name = 'auto'}, appendud )( _tab, _ud ) -- create & launch a thread
46assert(t) 46assert(t)
47assert(not err) 47assert(not err)
48 48
diff --git a/tests/atexit.lua b/tests/atexit.lua
index 9fc3070..ba10d3b 100644
--- a/tests/atexit.lua
+++ b/tests/atexit.lua
@@ -16,8 +16,8 @@ local g = function()
16 print "User cancellation detected!" 16 print "User cancellation detected!"
17end 17end
18 18
19local genF = lanes.gen( "", {globals = {threadName = "mylane"}}, f) 19local genF = lanes.gen( "", {name = 'auto', globals = {threadName = "mylane"}}, f)
20local genG = lanes.gen( "", g) 20local genG = lanes.gen( "", { name = 'auto'}, g)
21 21
22 22
23-- launch a good batch of free running lanes 23-- launch a good batch of free running lanes
diff --git a/tests/basic.lua b/tests/basic.lua
index 820d3c8..068dc25 100644
--- a/tests/basic.lua
+++ b/tests/basic.lua
@@ -15,7 +15,7 @@ local lanes = require_lanes_result_1
15local require_assert_result_1, require_assert_result_2 = require "assert" -- assert.fails() 15local require_assert_result_1, require_assert_result_2 = require "assert" -- assert.fails()
16print("require_assert_result:", require_assert_result_1, require_assert_result_2) 16print("require_assert_result:", require_assert_result_1, require_assert_result_2)
17 17
18local lanes_gen= assert(lanes.gen) 18local lanes_gen assert(lanes.gen)
19local lanes_linda = assert(lanes.linda) 19local lanes_linda = assert(lanes.linda)
20 20
21local tostring= assert(tostring) 21local tostring= assert(tostring)
@@ -86,7 +86,7 @@ local function task(a, b, c)
86 return v, hey 86 return v, hey
87end 87end
88 88
89local task_launch= lanes_gen("", { globals={hey=true}, gc_cb = gc_cb}, task) 89local task_launch= lanes.gen("", { name = 'auto', globals={hey=true}, gc_cb = gc_cb }, task)
90 -- base stdlibs, normal priority 90 -- base stdlibs, normal priority
91 91
92-- 'task_launch' is a factory of multithreaded tasks, we can launch several: 92-- 'task_launch' is a factory of multithreaded tasks, we can launch several:
@@ -126,7 +126,7 @@ collectgarbage()
126 126
127PRINT("\n\n", "---=== Tasking (cancelling) ===---", "\n\n") 127PRINT("\n\n", "---=== Tasking (cancelling) ===---", "\n\n")
128 128
129local task_launch2= lanes_gen("", { globals={hey=true}, gc_cb = gc_cb}, task) 129local task_launch2= lanes.gen("", { name = 'auto', globals={hey=true}, gc_cb = gc_cb }, task)
130 130
131local N=999999999 131local N=999999999
132local lane9= task_launch2(1,N,1) -- huuuuuuge... 132local lane9= task_launch2(1,N,1) -- huuuuuuge...
@@ -177,7 +177,7 @@ local wait_send = function()
177 a,b = limited:send("key", "bybye") -- infinite timeout, returns only when lane is cancelled 177 a,b = limited:send("key", "bybye") -- infinite timeout, returns only when lane is cancelled
178end 178end
179 179
180local wait_send_lane = lanes.gen("*", wait_send)() 180local wait_send_lane = lanes.gen("*", { name = 'auto' }, wait_send)()
181repeat until wait_send_lane.status == "waiting" 181repeat until wait_send_lane.status == "waiting"
182print "wait_send_lane is waiting" 182print "wait_send_lane is waiting"
183wait_send_lane:cancel() -- hard cancel, 0 timeout 183wait_send_lane:cancel() -- hard cancel, 0 timeout
@@ -190,7 +190,7 @@ local wait_receive = function()
190 k, v = limited:receive("dummy") -- infinite timeout, returns only when lane is cancelled 190 k, v = limited:receive("dummy") -- infinite timeout, returns only when lane is cancelled
191end 191end
192 192
193local wait_receive_lane = lanes.gen("*", wait_receive)() 193local wait_receive_lane = lanes.gen("*", { name = 'auto' }, wait_receive)()
194repeat until wait_receive_lane.status == "waiting" 194repeat until wait_receive_lane.status == "waiting"
195print "wait_receive_lane is waiting" 195print "wait_receive_lane is waiting"
196wait_receive_lane:cancel() -- hard cancel, 0 timeout 196wait_receive_lane:cancel() -- hard cancel, 0 timeout
@@ -203,7 +203,7 @@ local wait_receive_batched = function()
203 k, v1, v2 = limited:receive(limited.batched, "dummy", 2) -- infinite timeout, returns only when lane is cancelled 203 k, v1, v2 = limited:receive(limited.batched, "dummy", 2) -- infinite timeout, returns only when lane is cancelled
204end 204end
205 205
206local wait_receive_batched_lane = lanes.gen("*", wait_receive_batched)() 206local wait_receive_batched_lane = lanes.gen("*", { name = 'auto' }, wait_receive_batched)()
207repeat until wait_receive_batched_lane.status == "waiting" 207repeat until wait_receive_batched_lane.status == "waiting"
208print "wait_receive_batched_lane is waiting" 208print "wait_receive_batched_lane is waiting"
209wait_receive_batched_lane:cancel() -- hard cancel, 0 timeout 209wait_receive_batched_lane:cancel() -- hard cancel, 0 timeout
@@ -275,7 +275,7 @@ local function PEEK(...) return linda:get("<-", ...) end
275local function SEND(...) local _res, _err = linda:send("->", ...) assert(_res == true and _err == nil) end 275local function SEND(...) local _res, _err = linda:send("->", ...) assert(_res == true and _err == nil) end
276local function RECEIVE() local k,v = linda:receive(1, "<-") return v end 276local function RECEIVE() local k,v = linda:receive(1, "<-") return v end
277 277
278local comms_lane = lanes_gen("io", {gc_cb = gc_cb, name = "auto"}, chunk)(linda) -- prepare & launch 278local comms_lane = lanes.gen("io", { name = 'auto', gc_cb = gc_cb }, chunk)(linda) -- prepare & launch
279 279
280SEND(1); WR("main ", "1 sent\n") 280SEND(1); WR("main ", "1 sent\n")
281SEND(2); WR("main ", "2 sent\n") 281SEND(2); WR("main ", "2 sent\n")
@@ -355,7 +355,7 @@ local function coro_f(_x)
355 return true 355 return true
356end 356end
357 357
358assert.fails(function() lanes_gen("xxx", {gc_cb = gc_cb}, io_os_f) end) 358assert.fails(function() lanes_gen("xxx", {name = 'auto', gc_cb = gc_cb }, io_os_f) end)
359 359
360local stdlib_naming_tests = 360local stdlib_naming_tests =
361{ 361{
@@ -371,7 +371,7 @@ local stdlib_naming_tests =
371} 371}
372 372
373for _, t in ipairs(stdlib_naming_tests) do 373for _, t in ipairs(stdlib_naming_tests) do
374 local f= lanes_gen(t[1], {gc_cb = gc_cb}, t[2]) -- any delimiter will do 374 local f= lanes.gen(t[1], { name = 'auto', gc_cb = gc_cb }, t[2]) -- any delimiter will do
375 assert(f(t[1])[1]) 375 assert(f(t[1])[1])
376end 376end
377 377
@@ -386,7 +386,7 @@ PRINT("\n\n", "---=== Comms criss cross ===---", "\n\n")
386 386
387-- We make two identical lanes, which are using the same Linda channel. 387-- We make two identical lanes, which are using the same Linda channel.
388-- 388--
389local tc= lanes_gen("io", {gc_cb = gc_cb}, 389local tc = lanes.gen("io", { name = 'auto', gc_cb = gc_cb },
390 function(linda, ch_in, ch_out) 390 function(linda, ch_in, ch_out)
391 lane_threadname("criss cross " .. ch_in .. " -> " .. ch_out) 391 lane_threadname("criss cross " .. ch_in .. " -> " .. ch_out)
392 local function STAGE(str) 392 local function STAGE(str)
@@ -453,7 +453,7 @@ local function chunk2(linda)
453end 453end
454 454
455local linda = lanes_linda("auto") 455local linda = lanes_linda("auto")
456local t2= lanes_gen("debug,string,io", {gc_cb = gc_cb}, chunk2)(linda) -- prepare & launch 456local t2 = lanes.gen("debug,string,io", { name = 'auto', gc_cb = gc_cb }, chunk2)(linda) -- prepare & launch
457linda:send("down", function(linda) linda:send("up", "ready!") end, 457linda:send("down", function(linda) linda:send("up", "ready!") end,
458 "ok") 458 "ok")
459-- wait to see if the tiny function gets executed 459-- wait to see if the tiny function gets executed
@@ -486,7 +486,7 @@ PRINT("\n\n", "---=== :join test ===---", "\n\n")
486-- (unless [1..n] has been read earlier, in which case it would seemingly 486-- (unless [1..n] has been read earlier, in which case it would seemingly
487-- work). 487-- work).
488 488
489local S= lanes_gen("table", {gc_cb = gc_cb}, 489local S = lanes.gen("table", { name = 'auto', gc_cb = gc_cb },
490 function(arg) 490 function(arg)
491 lane_threadname "join test lane" 491 lane_threadname "join test lane"
492 set_finalizer(function() end) 492 set_finalizer(function() end)
diff --git a/tests/cancel.lua b/tests/cancel.lua
index 5862c85..80e6c6a 100644
--- a/tests/cancel.lua
+++ b/tests/cancel.lua
@@ -160,7 +160,7 @@ end
160if not next(which_tests) or which_tests.linda then 160if not next(which_tests) or which_tests.linda then
161 remaining_tests.linda = nil 161 remaining_tests.linda = nil
162 print "\n\n####################################################################\nbegin linda cancel test\n" 162 print "\n\n####################################################################\nbegin linda cancel test\n"
163 h = generator("*", laneBody)("receive", nil) -- start an infinite wait on the linda 163 h = generator("*", { name = 'auto' }, laneBody)("receive", nil) -- start an infinite wait on the linda
164 164
165 print "wait 1s" 165 print "wait 1s"
166 SLEEP(1) 166 SLEEP(1)
@@ -181,7 +181,7 @@ end
181if not next(which_tests) or which_tests.soft then 181if not next(which_tests) or which_tests.soft then
182 remaining_tests.soft = nil 182 remaining_tests.soft = nil
183 print "\n\n####################################################################\nbegin soft cancel test\n" 183 print "\n\n####################################################################\nbegin soft cancel test\n"
184 h = generator("*", protectedBody)("receive") -- start an infinite wait on the linda 184 h = generator("*", { name = 'auto' }, protectedBody)("receive") -- start an infinite wait on the linda
185 185
186 print "wait 1s" 186 print "wait 1s"
187 SLEEP(1) 187 SLEEP(1)
@@ -205,7 +205,7 @@ end
205if not next(which_tests) or which_tests.hook then 205if not next(which_tests) or which_tests.hook then
206 remaining_tests.hook = nil 206 remaining_tests.hook = nil
207 print "\n\n####################################################################\nbegin hook cancel test\n" 207 print "\n\n####################################################################\nbegin hook cancel test\n"
208 h = generator("*", protectedBody)("get", 300000) 208 h = generator("*", { name = 'auto' }, protectedBody)("get", 300000)
209 print "wait 2s" 209 print "wait 2s"
210 SLEEP(2) 210 SLEEP(2)
211 211
@@ -222,7 +222,7 @@ end
222if not next(which_tests) or which_tests.hard then 222if not next(which_tests) or which_tests.hard then
223 remaining_tests.hard = nil 223 remaining_tests.hard = nil
224 print "\n\n####################################################################\nbegin hard cancel test\n" 224 print "\n\n####################################################################\nbegin hard cancel test\n"
225 h = lanes.gen("*", protectedBody)("receive", nil) -- infinite timeout 225 h = lanes.gen("*", { name = 'auto' }, protectedBody)("receive", nil) -- infinite timeout
226 226
227 -- wait 2s before cancelling the lane 227 -- wait 2s before cancelling the lane
228 print "wait 2s" 228 print "wait 2s"
@@ -241,7 +241,7 @@ end
241if not next(which_tests) or which_tests.hard_unprotected then 241if not next(which_tests) or which_tests.hard_unprotected then
242 remaining_tests.hard_unprotected = nil 242 remaining_tests.hard_unprotected = nil
243 print "\n\n####################################################################\nbegin hard cancel test with unprotected lane body\n" 243 print "\n\n####################################################################\nbegin hard cancel test with unprotected lane body\n"
244 h = generator("*", laneBody)("receive", nil) 244 h = generator("*", { name = 'auto' }, laneBody)("receive", nil)
245 245
246 -- wait 2s before cancelling the lane 246 -- wait 2s before cancelling the lane
247 print "wait 2s" 247 print "wait 2s"
diff --git a/tests/cyclic.lua b/tests/cyclic.lua
index ed4bdba..ca4b9f5 100644
--- a/tests/cyclic.lua
+++ b/tests/cyclic.lua
@@ -31,7 +31,7 @@ local function lane1()
31 assert( b[1]==a ) 31 assert( b[1]==a )
32 return true 32 return true
33end 33end
34local L1= lanes.gen( "io", lane1 )() 34local L1= lanes.gen( "io", { name = 'auto' }, lane1 )()
35 -- ...running 35 -- ...running
36 36
37-- Getting the tables as arguments should also keep the linkage 37-- Getting the tables as arguments should also keep the linkage
@@ -42,7 +42,7 @@ local function lane2( aa, bb )
42 assert( bb[1]==aa ) 42 assert( bb[1]==aa )
43 return true 43 return true
44end 44end
45local L2= lanes.gen( "io", lane2 )( a, b ) 45local L2= lanes.gen( "io", { name = 'auto' }, lane2 )( a, b )
46 -- ...running 46 -- ...running
47 47
48-- Really unnecessary, but let's try a directly recursive table 48-- Really unnecessary, but let's try a directly recursive table
@@ -55,7 +55,7 @@ local function lane3( cc )
55 assert( cc and cc.a==cc ) 55 assert( cc and cc.a==cc )
56 return true 56 return true
57end 57end
58local L3= lanes.gen("io", lane3)(c) 58local L3= lanes.gen("io", { name = 'auto' }, lane3)(c)
59 59
60-- Without a wait, exit from the main lane will close the process 60-- Without a wait, exit from the main lane will close the process
61-- 61--
diff --git a/tests/ehynes.lua b/tests/ehynes.lua
index cdcd5a5..e4b56a5 100644
--- a/tests/ehynes.lua
+++ b/tests/ehynes.lua
@@ -16,7 +16,7 @@ end
16local linda = lanes.linda() 16local linda = lanes.linda()
17 17
18-- a linda message receiver 18-- a linda message receiver
19local receiver_gen = lanes.gen( 'base', 'os', 'string', 'io', 19local receiver_gen = lanes.gen( 'base', 'os', 'string', 'io', { name = 'auto' },
20 function (message_name) 20 function (message_name)
21 PRINT_FMT( 'receiver for message %s entered', message_name ) 21 PRINT_FMT( 'receiver for message %s entered', message_name )
22 local n = 1 22 local n = 1
diff --git a/tests/error.lua b/tests/error.lua
index 243dd57..306c51d 100644
--- a/tests/error.lua
+++ b/tests/error.lua
@@ -87,7 +87,7 @@ end
87--################################################################################################## 87--##################################################################################################
88 88
89local start_lane = function(error_reporting_mode_, error_value_, finalizer_, finalizer_error_value_) 89local start_lane = function(error_reporting_mode_, error_value_, finalizer_, finalizer_error_value_)
90 return lanes.gen("*", {error_trace_level = error_reporting_mode_}, lane_body)(error_value_, finalizer_, finalizer_error_value_) 90 return lanes.gen("*", { name = 'auto', error_trace_level = error_reporting_mode_ }, lane_body)(error_value_, finalizer_, finalizer_error_value_)
91end 91end
92 92
93--################################################################################################## 93--##################################################################################################
diff --git a/tests/fibonacci.lua b/tests/fibonacci.lua
index 7885ae6..2c043c3 100644
--- a/tests/fibonacci.lua
+++ b/tests/fibonacci.lua
@@ -44,7 +44,7 @@ local function fib( n )
44 else 44 else
45 -- Splits into two; this task remains waiting for the results 45 -- Splits into two; this task remains waiting for the results
46 -- 46 --
47 local gen_f= lanes.gen( "*", fib) 47 local gen_f= lanes.gen( "*", { name = 'auto' }, fib)
48 48
49 local n1=floor(n/2) +1 49 local n1=floor(n/2) +1
50 local n2=floor(n/2) -1 + n%2 50 local n2=floor(n/2) -1 + n%2
diff --git a/tests/finalizer.lua b/tests/finalizer.lua
index 8bf89b4..ac5ce8b 100644
--- a/tests/finalizer.lua
+++ b/tests/finalizer.lua
@@ -69,7 +69,7 @@ cleanup = function(err)
69end 69end
70 70
71-- we need error_trace_level above "minimal" to get a stack trace out of h:join() 71-- we need error_trace_level above "minimal" to get a stack trace out of h:join()
72local lgen = lanes.gen("*", {error_trace_level = "basic"}, lane) 72local lgen = lanes.gen("*", { name = 'auto', error_trace_level = "basic" }, lane)
73 73
74local do_test = function(error_) 74local do_test = function(error_)
75 75
diff --git a/tests/func_is_string.lua b/tests/func_is_string.lua
index a14c460..5de4c60 100644
--- a/tests/func_is_string.lua
+++ b/tests/func_is_string.lua
@@ -7,7 +7,7 @@ if _VERSION >= "Lua 5.4" then
7 local lanes = require 'lanes' 7 local lanes = require 'lanes'
8 local r 8 local r
9 do 9 do
10 local h <close> = lanes.gen('*', lanes.sleep)(0.5) 10 local h <close> = lanes.gen('*', { name = 'auto' }, lanes.sleep)(0.5)
11 r = h 11 r = h
12 end -- h is closed here 12 end -- h is closed here
13 return r.status 13 return r.status
@@ -21,8 +21,8 @@ end
21 21
22local options = {globals = { b = 666 }} 22local options = {globals = { b = 666 }}
23 23
24local gen1 = lanes.gen("*", "return true, dofile('fibonacci.lua')") 24local gen1 = lanes.gen("*", { name = 'auto' }, "return true, dofile('fibonacci.lua')")
25local gen2 = lanes.gen(options, "return b") 25local gen2 = lanes.gen(options, { name = 'auto' }, "return b")
26 26
27fibLane = gen1() 27fibLane = gen1()
28lanes.sleep(0.1) 28lanes.sleep(0.1)
diff --git a/tests/hangtest.lua b/tests/hangtest.lua
index 0e44451..e48ff60 100644
--- a/tests/hangtest.lua
+++ b/tests/hangtest.lua
@@ -7,7 +7,7 @@ local lanes = require "lanes"
7local function ret(b) 7local function ret(b)
8 return b 8 return b
9end 9end
10local lgen = lanes.gen("*", {}, ret) 10local lgen = lanes.gen("*", { name = 'auto' }, ret)
11 11
12for i=1,10000 do 12for i=1,10000 do
13 local ln = lgen(i) 13 local ln = lgen(i)
diff --git a/tests/irayo_closure.lua b/tests/irayo_closure.lua
index 45189ec..705b85e 100644
--- a/tests/irayo_closure.lua
+++ b/tests/irayo_closure.lua
@@ -33,5 +33,5 @@ local function useclosurehere()
33 print "using the closure" 33 print "using the closure"
34end 34end
35 35
36local lane= lanes.gen( "", { globals = { data=1, func=useclosurehere } }, testrun )() 36local lane= lanes.gen( "", { name = 'auto', globals = { data=1, func=useclosurehere } }, testrun )()
37print(lane[1]) 37print(lane[1])
diff --git a/tests/irayo_recursive.lua b/tests/irayo_recursive.lua
index 0187a15..99522f7 100644
--- a/tests/irayo_recursive.lua
+++ b/tests/irayo_recursive.lua
@@ -11,7 +11,7 @@ local function recurse()
11 11
12 --local lanes = require "lanes" 12 --local lanes = require "lanes"
13 13
14 local lane = lanes.gen( "base,string,lanes_core", { globals = { ["i"]= i + 1 } }, recurse ) () 14 local lane = lanes.gen( "base,string,lanes_core", { name = 'auto', globals = { ["i"]= i + 1 } }, recurse ) ()
15 return lane[1] 15 return lane[1]
16end 16end
17 17
diff --git a/tests/keeper.lua b/tests/keeper.lua
index 0e93de2..f566927 100644
--- a/tests/keeper.lua
+++ b/tests/keeper.lua
@@ -160,7 +160,7 @@ if true then
160 end 160 end
161 161
162 PRINT("lane started") 162 PRINT("lane started")
163 local h= lanes.gen( "io", lane )() 163 local h= lanes.gen( "io", { name = 'auto' }, lane )()
164 PRINT("lane joined:", h:join()) 164 PRINT("lane joined:", h:join())
165 165
166 PRINT("A.some = " .. A.some ) 166 PRINT("A.some = " .. A.some )
diff --git a/tests/lanes_as_upvalue.lua b/tests/lanes_as_upvalue.lua
index e7fcd3a..beef22e 100644
--- a/tests/lanes_as_upvalue.lua
+++ b/tests/lanes_as_upvalue.lua
@@ -4,7 +4,7 @@ local function foo()
4 local lanes = lanes -- lanes as upvalue 4 local lanes = lanes -- lanes as upvalue
5end 5end
6 6
7local g = lanes.gen( "*", {error_trace_level = "extended"}, foo) 7local g = lanes.gen( "*", { name = 'auto', error_trace_level = "extended"}, foo)
8 8
9-- this should raise an error as lanes.timer_lane is a Lane (a non-deep full userdata) 9-- this should raise an error as lanes.timer_lane is a Lane (a non-deep full userdata)
10local res, err = pcall( g) 10local res, err = pcall( g)
diff --git a/tests/launchtest.lua b/tests/launchtest.lua
index 16db242..57411e1 100644
--- a/tests/launchtest.lua
+++ b/tests/launchtest.lua
@@ -47,7 +47,7 @@ end
47 47
48local lanes = require "lanes" 48local lanes = require "lanes"
49 49
50local g= lanes.gen( LIBS, function(i) 50local g= lanes.gen( LIBS, { name = 'auto' }, function(i)
51 --io.stderr:write( i.."\t" ) 51 --io.stderr:write( i.."\t" )
52 return i 52 return i
53 end ) 53 end )
diff --git a/tests/linda_perf.lua b/tests/linda_perf.lua
index 96f26f4..bba1408 100644
--- a/tests/linda_perf.lua
+++ b/tests/linda_perf.lua
@@ -79,8 +79,8 @@ end
79 79
80-- ################################################################################################# 80-- #################################################################################################
81 81
82local lane_eater_gen = lanes.gen( "*", {priority = 3}, eater) 82local lane_eater_gen = lanes.gen( "*", { name = 'auto', priority = 3 }, eater)
83local lane_gobbler_gen = lanes.gen( "*", {priority = 3}, gobbler) 83local lane_gobbler_gen = lanes.gen( "*", { name = 'auto', priority = 3 }, gobbler)
84 84
85-- ################################################################################################# 85-- #################################################################################################
86 86
diff --git a/tests/manual_register.lua b/tests/manual_register.lua
index 52cc4ed..36a41ad 100644
--- a/tests/manual_register.lua
+++ b/tests/manual_register.lua
@@ -25,7 +25,7 @@ local f = function()
25end 25end
26 26
27 27
28local g = lanes.gen( "*", f) 28local g = lanes.gen( "*", { name = 'auto' }, f)
29 29
30-- generate a lane, this will transfer f, which pulls GlobalFunc. 30-- generate a lane, this will transfer f, which pulls GlobalFunc.
31local h = g() 31local h = g()
diff --git a/tests/nameof.lua b/tests/nameof.lua
index 1abcf3d..fb7332a 100644
--- a/tests/nameof.lua
+++ b/tests/nameof.lua
@@ -18,7 +18,7 @@ local body = function()
18end 18end
19 19
20-- start the lane without any library 20-- start the lane without any library
21local h = lanes.gen(nil, body)() 21local h = lanes.gen(nil, { name = 'auto' }, body)()
22SLEEP(0.1) 22SLEEP(0.1)
23print("Name of lane: ", lanes.nameof(h), "("..h.status..")") 23print("Name of lane: ", lanes.nameof(h), "("..h.status..")")
24assert(h.status == "running") 24assert(h.status == "running")
diff --git a/tests/objects.lua b/tests/objects.lua
index ed460af..22a4df1 100644
--- a/tests/objects.lua
+++ b/tests/objects.lua
@@ -8,7 +8,7 @@ local lanes = require "lanes"
8 8
9local linda= lanes.linda() 9local linda= lanes.linda()
10 10
11local start_lane= lanes.gen("io", 11local start_lane= lanes.gen("io", { name = 'auto' },
12 function(obj1 ) 12 function(obj1 )
13 13
14 assert(obj1.v ) 14 assert(obj1.v )
diff --git a/tests/parallel_os_calls.lua b/tests/parallel_os_calls.lua
index 8030d4c..55159e8 100644
--- a/tests/parallel_os_calls.lua
+++ b/tests/parallel_os_calls.lua
@@ -1,15 +1,15 @@
1local lanes = require "lanes" 1local lanes = require "lanes"
2print( os.date()) 2print( os.date())
3local linda = lanes.linda() 3local linda = lanes.linda()
4local l1 = lanes.gen("os,base", function() print "start sleeping" linda:receive(3, "null") print("finished_sleeping " .. os.date()) return true end)() 4local l1 = lanes.gen("os,base", { name = 'auto' }, function() print "start sleeping" linda:receive(3, "null") print("finished_sleeping " .. os.date()) return true end)()
5lanes.gen("os,base", function() print "start sleeping" linda:receive(2, "null") print("finished_sleeping " .. os.date()) end)() 5lanes.gen("os,base", { name = 'auto' }, function() print "start sleeping" linda:receive(2, "null") print("finished_sleeping " .. os.date()) end)()
6lanes.gen("os,base", function() print "start sleeping" linda:receive(2, "null") print("finished_sleeping " .. os.date()) end)() 6lanes.gen("os,base", { name = 'auto' }, function() print "start sleeping" linda:receive(2, "null") print("finished_sleeping " .. os.date()) end)()
7lanes.gen("os,base", function() print "start sleeping" linda:receive(2, "null") print("finished_sleeping " .. os.date()) end)() 7lanes.gen("os,base", { name = 'auto' }, function() print "start sleeping" linda:receive(2, "null") print("finished_sleeping " .. os.date()) end)()
8-- wait, else all lanes will get hard-cancelled at stat shutdown 8-- wait, else all lanes will get hard-cancelled at stat shutdown
9l1:join() 9l1:join()
10--[[ 10--[[
11lanes.gen("os,base", function() os.execute('sleep 10 && echo finished_sleeping') print( os.date()) end)() 11lanes.gen("os,base", { name = 'auto' }, function() os.execute('sleep 10 && echo finished_sleeping') print( os.date()) end)()
12lanes.gen("os,base", function() os.execute('sleep 10 && echo finished_sleeping') print( os.date()) end)() 12lanes.gen("os,base", { name = 'auto' }, function() os.execute('sleep 10 && echo finished_sleeping') print( os.date()) end)()
13lanes.gen("os,base", function() os.execute('sleep 10 && echo finished_sleeping') print( os.date()) end)() 13lanes.gen("os,base", { name = 'auto' }, function() os.execute('sleep 10 && echo finished_sleeping') print( os.date()) end)()
14lanes.gen("os,base", function() os.execute('sleep 10 && echo finished_sleeping') print( os.date()) end)() 14lanes.gen("os,base", { name = 'auto' }, function() os.execute('sleep 10 && echo finished_sleeping') print( os.date()) end)()
15]] 15]]
diff --git a/tests/perftest.lua b/tests/perftest.lua
index 35f522c..fe43cca 100644
--- a/tests/perftest.lua
+++ b/tests/perftest.lua
@@ -137,10 +137,10 @@ end
137-- Keep preparation code outside of the performance test 137-- Keep preparation code outside of the performance test
138-- 138--
139local f_even= lanes.gen( "base,coroutine,math,table,io", -- "*" = all 139local f_even= lanes.gen( "base,coroutine,math,table,io", -- "*" = all
140 { priority= PRIO_EVEN }, sieve_lane ) 140 { name = 'auto', priority= PRIO_EVEN }, sieve_lane )
141 141
142local f_odd= lanes.gen( "base,coroutine,math,table,io", -- "*" = all 142local f_odd= lanes.gen( "base,coroutine,math,table,io", -- "*" = all
143 { priority= PRIO_ODD }, sieve_lane ) 143 { name = 'auto', priority= PRIO_ODD }, sieve_lane )
144 144
145io.stderr:write( "*** Counting primes 1.."..M.." "..N.." times ***\n\n" ) 145io.stderr:write( "*** Counting primes 1.."..M.." "..N.." times ***\n\n" )
146 146
diff --git a/tests/pingpong.lua b/tests/pingpong.lua
index 3498f49..06c0903 100644
--- a/tests/pingpong.lua
+++ b/tests/pingpong.lua
@@ -25,8 +25,8 @@ local pingpong = function(name, qr, qs, start)
25end 25end
26 26
27-- pingpong("L1", '0', '1', true) 27-- pingpong("L1", '0', '1', true)
28local t1, err1 = lanes.gen("*", pingpong)("L1", 'a', 'b', true) 28local t1, err1 = lanes.gen("*", { name = 'auto' }, pingpong)("L1", 'a', 'b', true)
29local t2, err2 = lanes.gen("*", pingpong)("L2", 'b', 'a', false) 29local t2, err2 = lanes.gen("*", { name = 'auto' }, pingpong)("L2", 'b', 'a', false)
30 30
31t1:join() 31t1:join()
32t2:join() 32t2:join()
diff --git a/tests/protect_allocator.lua b/tests/protect_allocator.lua
index 994cb39..e13a57c 100644
--- a/tests/protect_allocator.lua
+++ b/tests/protect_allocator.lua
@@ -36,7 +36,7 @@ end
36 36
37-- start threads 37-- start threads
38local COUNT = 4 38local COUNT = 4
39local gen = lanes.gen( "*", body) 39local gen = lanes.gen( "*", { name = 'auto' }, body)
40for i = 1, COUNT do 40for i = 1, COUNT do
41 gen( i) 41 gen( i)
42end 42end
diff --git a/tests/protectproxy.lua b/tests/protectproxy.lua
index ed1bd4f..84887ec 100644
--- a/tests/protectproxy.lua
+++ b/tests/protectproxy.lua
@@ -5,7 +5,7 @@ local body = function( param)
5 return 1 5 return 1
6end 6end
7 7
8local gen = lanes.gen( "*", body) 8local gen = lanes.gen( "*", { name = 'auto' }, body)
9 9
10local mylane = gen( "hello") 10local mylane = gen( "hello")
11 11
diff --git a/tests/recursive.lua b/tests/recursive.lua
index 716fe60..e294104 100644
--- a/tests/recursive.lua
+++ b/tests/recursive.lua
@@ -12,7 +12,7 @@ local function func( depth )
12 end 12 end
13 13
14 local lanes = require "lanes" 14 local lanes = require "lanes"
15 local lane = lanes.gen("*", func)( depth-1 ) 15 local lane = lanes.gen("*", { name = 'auto' }, func)( depth-1 )
16 return lane[1] 16 return lane[1]
17end 17end
18 18
diff --git a/tests/require.lua b/tests/require.lua
index b194af1..f017ddf 100644
--- a/tests/require.lua
+++ b/tests/require.lua
@@ -19,14 +19,14 @@ local function a_lane()
19 local lanes = require "lanes" 19 local lanes = require "lanes"
20 assert( lanes and lanes.gen ) 20 assert( lanes and lanes.gen )
21 21
22 local h= lanes.gen( function() return 42 end ) () 22 local h= lanes.gen( { name = 'auto' }, function() return 42 end ) ()
23 local v= h[1] 23 local v= h[1]
24 24
25 return v==42 25 return v==42
26end 26end
27 27
28-- string and table for Lanes itself, package to be able to require in the lane, math for the actual work 28-- string and table for Lanes itself, package to be able to require in the lane, math for the actual work
29local gen= lanes.gen( "math,package,string,table", {package={}},a_lane ) 29local gen= lanes.gen( "math,package,string,table", { name = 'auto', package={} },a_lane )
30 30
31local h= gen() 31local h= gen()
32local ret= h[1] 32local ret= h[1]
diff --git a/tests/rupval.lua b/tests/rupval.lua
index 122e0ac..ad5ad9d 100644
--- a/tests/rupval.lua
+++ b/tests/rupval.lua
@@ -23,7 +23,7 @@ c = function( n)
23 return n <= 0 and z or a( n-1) 23 return n <= 0 and z or a( n-1)
24end 24end
25 25
26local g = lanes.gen( "base", a) 26local g = lanes.gen( "base", { name = 'auto' }, a)
27 27
28local l = g(7) 28local l = g(7)
29local r = l:join() 29local r = l:join()
diff --git a/tests/tobeclosed.lua b/tests/tobeclosed.lua
index 7a5e3ae..ef09df3 100644
--- a/tests/tobeclosed.lua
+++ b/tests/tobeclosed.lua
@@ -86,7 +86,7 @@ do
86 return "success" 86 return "success"
87 end 87 end
88 88
89 local h = lanes.gen("*", lane_body)() 89 local h = lanes.gen("*", { name = 'auto' }, lane_body)()
90 do 90 do
91 local tobeclosed <close> = h 91 local tobeclosed <close> = h
92 end 92 end
@@ -118,7 +118,7 @@ do
118 l:set("trip", l_in) 118 l:set("trip", l_in)
119 119
120 do 120 do
121 lanes.gen("*", lane_body)(l_in):join() 121 lanes.gen("*", { name = 'auto' }, lane_body)(l_in):join()
122 end 122 end
123 local _count, _closed = l_in:get("closed") 123 local _count, _closed = l_in:get("closed")
124 assert(_count == 1 and _closed == 2) 124 assert(_count == 1 and _closed == 2)
diff --git a/tests/track_lanes.lua b/tests/track_lanes.lua
index 803fae5..d1670ae 100644
--- a/tests/track_lanes.lua
+++ b/tests/track_lanes.lua
@@ -43,7 +43,7 @@ end
43-- sleeper( "main", 1) 43-- sleeper( "main", 1)
44 44
45-- the generator 45-- the generator
46local g = lanes.gen( "*", sleeper) 46local g = lanes.gen( "*", { name = 'auto' }, sleeper)
47 47
48-- start a forever-waiting lane (nil timeout) 48-- start a forever-waiting lane (nil timeout)
49local forever = g( "forever", 'indefinitely') 49local forever = g( "forever", 'indefinitely')
diff --git a/unit_tests/embedded_tests.cpp b/unit_tests/embedded_tests.cpp
index a63383a..9a262d5 100644
--- a/unit_tests/embedded_tests.cpp
+++ b/unit_tests/embedded_tests.cpp
@@ -234,7 +234,7 @@ TEST_CASE("lanes.embedding.with custom allocator")
234 // lua_setfield(L, -2, "allocator"); // configure {on_state_create = on_state_create_, allocater = "protected"} 234 // lua_setfield(L, -2, "allocator"); // configure {on_state_create = on_state_create_, allocater = "protected"}
235 lua_pcall(L, 1, 0, 0); 235 lua_pcall(L, 1, 0, 0);
236 sprintf_s(script, 236 sprintf_s(script,
237 "g = lanes.gen('*', {globals = {ID = %d}}, function(id_) lane_threadname('Lane %d.'..id_) logPrint('This is L%d.'..id_) end)" // lane generator 237 "g = lanes.gen('*', { name = 'auto', globals = {ID = %d} }, function(id_) lane_threadname('Lane %d.'..id_) logPrint('This is L%d.'..id_) end)" // lane generator
238 "for i = 1,%d do _G['a'..i] = g(i) end" // launch a few lanes, handle stored in global a<i> 238 "for i = 1,%d do _G['a'..i] = g(i) end" // launch a few lanes, handle stored in global a<i>
239 , 239 ,
240 id_, 240 id_,
diff --git a/unit_tests/init_and_shutdown.cpp b/unit_tests/init_and_shutdown.cpp
index 7e4c215..9652f2d 100644
--- a/unit_tests/init_and_shutdown.cpp
+++ b/unit_tests/init_and_shutdown.cpp
@@ -829,6 +829,7 @@ TEST_CASE("lanes.on_state_create setting")
829 // launch a Lane that requires the module. It should succeed because _on_state_create was called and made it possible 829 // launch a Lane that requires the module. It should succeed because _on_state_create was called and made it possible
830 std::string_view const _script{ 830 std::string_view const _script{
831 " f = lanes.gen('*'," 831 " f = lanes.gen('*',"
832 " { name = 'auto' },"
832 " function()" 833 " function()"
833 " local Stuff = require ('Stuff')" 834 " local Stuff = require ('Stuff')"
834 " Stuff.DoStuffInC()" 835 " Stuff.DoStuffInC()"
diff --git a/unit_tests/lane_tests.cpp b/unit_tests/lane_tests.cpp
index bf239ba..0c4feba 100644
--- a/unit_tests/lane_tests.cpp
+++ b/unit_tests/lane_tests.cpp
@@ -80,7 +80,7 @@ TEST_CASE("lanes.sleep.interactions with timers")
80 " local l = lanes.linda()" 80 " local l = lanes.linda()"
81 " lanes.timer(l, 'gluh', 0.1, 0.1)" 81 " lanes.timer(l, 'gluh', 0.1, 0.1)"
82 // launch a lane that is supposed to sleep forever 82 // launch a lane that is supposed to sleep forever
83 " local g = lanes.gen('*', lanes.sleep)" 83 " local g = lanes.gen('*', { name = 'auto' }, lanes.sleep)"
84 " local h = g('indefinitely')" 84 " local h = g('indefinitely')"
85 // sleep 1 second (this uses the timer linda) 85 // sleep 1 second (this uses the timer linda)
86 " lanes.sleep(1)" 86 " lanes.sleep(1)"
diff --git a/unit_tests/scripts/coro/basics.lua b/unit_tests/scripts/coro/basics.lua
index dc74b7c..cd2f410 100644
--- a/unit_tests/scripts/coro/basics.lua
+++ b/unit_tests/scripts/coro/basics.lua
@@ -42,7 +42,7 @@ end
42 42
43if true then 43if true then
44 -- if we start a non-coroutine lane with a yielding function, we should get an error, right? 44 -- if we start a non-coroutine lane with a yielding function, we should get an error, right?
45 local fun_g = lanes.gen("*", {name = "auto"}, yielder) 45 local fun_g = lanes.gen("*", { name = 'auto' }, yielder)
46 local h = fun_g("hello", "world", "!") 46 local h = fun_g("hello", "world", "!")
47 local err, status, stack = h:join() 47 local err, status, stack = h:join()
48 PRINT(err, status, stack) 48 PRINT(err, status, stack)
diff --git a/unit_tests/scripts/lane/cooperative_shutdown.lua b/unit_tests/scripts/lane/cooperative_shutdown.lua
index 1204e35..756e33c 100644
--- a/unit_tests/scripts/lane/cooperative_shutdown.lua
+++ b/unit_tests/scripts/lane/cooperative_shutdown.lua
@@ -31,9 +31,9 @@ end
31 31
32 32
33-- the generators 33-- the generators
34local g1 = lanes.gen("*", lane1) 34local g1 = lanes.gen("*", { name = 'auto' }, lane1)
35local g2 = lanes.gen("*", lane2) 35local g2 = lanes.gen("*", { name = 'auto' }, lane2)
36local g3 = lanes.gen("*", lane3) 36local g3 = lanes.gen("*", { name = 'auto' }, lane3)
37 37
38-- launch lanes 38-- launch lanes
39local h1 = g1() 39local h1 = g1()
diff --git a/unit_tests/scripts/lane/stdlib_naming.lua b/unit_tests/scripts/lane/stdlib_naming.lua
index 2e045c3..4884cca 100644
--- a/unit_tests/scripts/lane/stdlib_naming.lua
+++ b/unit_tests/scripts/lane/stdlib_naming.lua
@@ -63,7 +63,7 @@ local function coro_f(_x)
63 return true 63 return true
64end 64end
65 65
66assert.fails(function() lanes_gen("xxx", {gc_cb = gc_cb}, io_os_f) end) 66assert.fails(function() lanes_gen("xxx", { name = 'auto', gc_cb = gc_cb }, io_os_f) end)
67 67
68local stdlib_naming_tests = 68local stdlib_naming_tests =
69{ 69{
diff --git a/unit_tests/scripts/lane/tasking_basic.lua b/unit_tests/scripts/lane/tasking_basic.lua
index 99be321..233accf 100644
--- a/unit_tests/scripts/lane/tasking_basic.lua
+++ b/unit_tests/scripts/lane/tasking_basic.lua
@@ -39,7 +39,7 @@ end
39 39
40PRINT("\n\n", "---=== Tasking (basic) ===---", "\n\n") 40PRINT("\n\n", "---=== Tasking (basic) ===---", "\n\n")
41 41
42local task_launch = lanes_gen("", { globals={hey=true}, gc_cb = gc_cb}, task) 42local task_launch = lanes_gen("", { name = 'auto', globals={hey=true}, gc_cb = gc_cb }, task)
43 -- base stdlibs, normal priority 43 -- base stdlibs, normal priority
44 44
45-- 'task_launch' is a factory of multithreaded tasks, we can launch several: 45-- 'task_launch' is a factory of multithreaded tasks, we can launch several:
diff --git a/unit_tests/scripts/lane/tasking_cancelling.lua b/unit_tests/scripts/lane/tasking_cancelling.lua
index a4e0fde..85600ab 100644
--- a/unit_tests/scripts/lane/tasking_cancelling.lua
+++ b/unit_tests/scripts/lane/tasking_cancelling.lua
@@ -36,7 +36,7 @@ end
36 36
37PRINT("\n\n", "---=== Tasking (cancelling) ===---", "\n\n") 37PRINT("\n\n", "---=== Tasking (cancelling) ===---", "\n\n")
38 38
39local task_launch2 = lanes_gen("", { globals={hey=true}, gc_cb = gc_cb}, task) 39local task_launch2 = lanes_gen("", { name = 'auto', globals={hey=true}, gc_cb = gc_cb }, task)
40 40
41local N=999999999 41local N=999999999
42local lane9= task_launch2(1,N,1) -- huuuuuuge... 42local lane9= task_launch2(1,N,1) -- huuuuuuge...
@@ -87,7 +87,7 @@ local wait_send = function()
87 a,b = limited:send("key", "bybye") -- infinite timeout, returns only when lane is cancelled 87 a,b = limited:send("key", "bybye") -- infinite timeout, returns only when lane is cancelled
88end 88end
89 89
90local wait_send_lane = lanes.gen("*", wait_send)() 90local wait_send_lane = lanes_gen("*", { name = 'auto' }, wait_send)()
91repeat until wait_send_lane.status == "waiting" 91repeat until wait_send_lane.status == "waiting"
92print "wait_send_lane is waiting" 92print "wait_send_lane is waiting"
93wait_send_lane:cancel() -- hard cancel, 0 timeout 93wait_send_lane:cancel() -- hard cancel, 0 timeout
@@ -100,7 +100,7 @@ local wait_receive = function()
100 k, v = limited:receive("dummy") -- infinite timeout, returns only when lane is cancelled 100 k, v = limited:receive("dummy") -- infinite timeout, returns only when lane is cancelled
101end 101end
102 102
103local wait_receive_lane = lanes.gen("*", wait_receive)() 103local wait_receive_lane = lanes_gen("*", { name = 'auto' }, wait_receive)()
104repeat until wait_receive_lane.status == "waiting" 104repeat until wait_receive_lane.status == "waiting"
105print "wait_receive_lane is waiting" 105print "wait_receive_lane is waiting"
106wait_receive_lane:cancel() -- hard cancel, 0 timeout 106wait_receive_lane:cancel() -- hard cancel, 0 timeout
@@ -113,7 +113,7 @@ local wait_receive_batched = function()
113 k, v1, v2 = limited:receive(limited.batched, "dummy", 2) -- infinite timeout, returns only when lane is cancelled 113 k, v1, v2 = limited:receive(limited.batched, "dummy", 2) -- infinite timeout, returns only when lane is cancelled
114end 114end
115 115
116local wait_receive_batched_lane = lanes.gen("*", wait_receive_batched)() 116local wait_receive_batched_lane = lanes_gen("*", { name = 'auto' }, wait_receive_batched)()
117repeat until wait_receive_batched_lane.status == "waiting" 117repeat until wait_receive_batched_lane.status == "waiting"
118print "wait_receive_batched_lane is waiting" 118print "wait_receive_batched_lane is waiting"
119wait_receive_batched_lane:cancel() -- hard cancel, 0 timeout 119wait_receive_batched_lane:cancel() -- hard cancel, 0 timeout
diff --git a/unit_tests/scripts/lane/tasking_comms_criss_cross.lua b/unit_tests/scripts/lane/tasking_comms_criss_cross.lua
index db63b8e..497e81d 100644
--- a/unit_tests/scripts/lane/tasking_comms_criss_cross.lua
+++ b/unit_tests/scripts/lane/tasking_comms_criss_cross.lua
@@ -27,7 +27,7 @@ PRINT("\n\n", "---=== Comms criss cross ===---", "\n\n")
27 27
28-- We make two identical lanes, which are using the same Linda channel. 28-- We make two identical lanes, which are using the same Linda channel.
29-- 29--
30local tc = lanes_gen("io", {gc_cb = gc_cb}, 30local tc = lanes_gen("io", { name = 'auto', gc_cb = gc_cb },
31 function(linda, ch_in, ch_out) 31 function(linda, ch_in, ch_out)
32 lane_threadname("criss cross " .. ch_in .. " -> " .. ch_out) 32 lane_threadname("criss cross " .. ch_in .. " -> " .. ch_out)
33 local function STAGE(str) 33 local function STAGE(str)
diff --git a/unit_tests/scripts/lane/tasking_communications.lua b/unit_tests/scripts/lane/tasking_communications.lua
index b922973..1fd43b0 100644
--- a/unit_tests/scripts/lane/tasking_communications.lua
+++ b/unit_tests/scripts/lane/tasking_communications.lua
@@ -101,7 +101,7 @@ local function PEEK(...) return linda:get("<-", ...) end
101local function SEND(...) local _res, _err = linda:send("->", ...) assert(_res == true and _err == nil) end 101local function SEND(...) local _res, _err = linda:send("->", ...) assert(_res == true and _err == nil) end
102local function RECEIVE() local k,v = linda:receive(1, "<-") return v end 102local function RECEIVE() local k,v = linda:receive(1, "<-") return v end
103 103
104local comms_lane = lanes_gen("io", {gc_cb = gc_cb, name = "auto"}, chunk)(linda) -- prepare & launch 104local comms_lane = lanes_gen("io", { name = 'auto', gc_cb = gc_cb }, chunk)(linda) -- prepare & launch
105 105
106SEND(1); WR("main ", "1 sent\n") 106SEND(1); WR("main ", "1 sent\n")
107SEND(2); WR("main ", "2 sent\n") 107SEND(2); WR("main ", "2 sent\n")
diff --git a/unit_tests/scripts/lane/tasking_error.lua b/unit_tests/scripts/lane/tasking_error.lua
index 1e2347f..26f244b 100644
--- a/unit_tests/scripts/lane/tasking_error.lua
+++ b/unit_tests/scripts/lane/tasking_error.lua
@@ -22,7 +22,7 @@ end
22PRINT("---=== Tasking (error) ===---", "\n\n") 22PRINT("---=== Tasking (error) ===---", "\n\n")
23 23
24-- a lane that throws immediately the error value it received 24-- a lane that throws immediately the error value it received
25local g = lanes_gen("", {gc_cb = gc_cb}, error) 25local g = lanes_gen("", { name = 'auto', gc_cb = gc_cb }, error)
26local errmsg = "ERROR!" 26local errmsg = "ERROR!"
27 27
28if true then 28if true then
diff --git a/unit_tests/scripts/lane/tasking_join_test.lua b/unit_tests/scripts/lane/tasking_join_test.lua
index 8f2d4db..2fbce6c 100644
--- a/unit_tests/scripts/lane/tasking_join_test.lua
+++ b/unit_tests/scripts/lane/tasking_join_test.lua
@@ -34,7 +34,7 @@ PRINT("---=== :join test ===---", "\n\n")
34-- (unless [1..n] has been read earlier, in which case it would seemingly 34-- (unless [1..n] has been read earlier, in which case it would seemingly
35-- work). 35-- work).
36 36
37local S= lanes_gen("table", {gc_cb = gc_cb}, 37local S= lanes_gen("table", { name = 'auto', gc_cb = gc_cb },
38 function(arg) 38 function(arg)
39 lane_threadname "join test lane" 39 lane_threadname "join test lane"
40 set_finalizer(function() end) 40 set_finalizer(function() end)
diff --git a/unit_tests/scripts/lane/tasking_send_receive_code.lua b/unit_tests/scripts/lane/tasking_send_receive_code.lua
index 77a4b12..e329a88 100644
--- a/unit_tests/scripts/lane/tasking_send_receive_code.lua
+++ b/unit_tests/scripts/lane/tasking_send_receive_code.lua
@@ -66,7 +66,7 @@ local function chunk2(linda)
66end 66end
67 67
68local linda = lanes_linda("auto") 68local linda = lanes_linda("auto")
69local t2= lanes_gen("debug,package,string,io", {gc_cb = gc_cb}, chunk2)(linda) -- prepare & launch 69local t2= lanes_gen("debug,package,string,io", { name = 'auto', gc_cb = gc_cb }, chunk2)(linda) -- prepare & launch
70linda:send("down", function(linda) linda:send("up", "ready!") end, 70linda:send("down", function(linda) linda:send("up", "ready!") end,
71 "ok") 71 "ok")
72-- wait to see if the tiny function gets executed 72-- wait to see if the tiny function gets executed
diff --git a/unit_tests/scripts/lane/uncooperative_shutdown.lua b/unit_tests/scripts/lane/uncooperative_shutdown.lua
index 56c936b..51e5762 100644
--- a/unit_tests/scripts/lane/uncooperative_shutdown.lua
+++ b/unit_tests/scripts/lane/uncooperative_shutdown.lua
@@ -12,7 +12,7 @@ local lane = function()
12end 12end
13 13
14-- the generator 14-- the generator
15local g1 = lanes.gen("*", {name = "auto"}, lane) 15local g1 = lanes.gen("*", { name = 'auto' }, lane)
16 16
17-- launch lane 17-- launch lane
18local h1 = g1() 18local h1 = g1()