aboutsummaryrefslogtreecommitdiff
path: root/tests/basic.lua
diff options
context:
space:
mode:
Diffstat (limited to 'tests/basic.lua')
-rw-r--r--tests/basic.lua17
1 files changed, 9 insertions, 8 deletions
diff --git a/tests/basic.lua b/tests/basic.lua
index 9aaad97..f393175 100644
--- a/tests/basic.lua
+++ b/tests/basic.lua
@@ -507,19 +507,20 @@ local S = lanes.gen("table", { name = 'auto', gc_cb = gc_cb },
507 return (unpack or table.unpack)(aux) 507 return (unpack or table.unpack)(aux)
508end) 508end)
509 509
510h= S { 12, 13, 14 } -- execution starts, h[1..3] will get the return values 510h = S { 12, 13, 14 } -- execution starts, h[1..3] will get the return values
511-- wait a bit so that the lane has a chance to set its debug name 511-- wait a bit so that the lane has a chance to set its debug name
512SLEEP(0.5) 512SLEEP(0.5)
513print("joining with '" .. h:get_threadname() .. "'") 513print("joining with '" .. h:get_threadname() .. "'")
514local a,b,c,d= h:join() 514local r,a,b,c,d= h:join()
515if h.status == "error" then 515if h.status == "error" then
516 print(h:get_threadname(), "error: " , a, b, c, d) 516 print(h:get_threadname(), "error: " , r, a, b, c, d)
517else 517else
518 print(h:get_threadname(), a,b,c,d) 518 print(h:get_threadname(), r,a,b,c,d)
519 assert(a==14) 519 assert(r == true)
520 assert(b==13) 520 assert(a == 14)
521 assert(c==12) 521 assert(b == 13)
522 assert(d==nil) 522 assert(c == 12)
523 assert(d == nil)
523end 524end
524 525
525local nameof_type, nameof_name = lanes.nameof(print) 526local nameof_type, nameof_name = lanes.nameof(print)