diff options
Diffstat (limited to 'tests/basic.lua')
-rw-r--r-- | tests/basic.lua | 17 |
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) |
508 | end) | 508 | end) |
509 | 509 | ||
510 | h= S { 12, 13, 14 } -- execution starts, h[1..3] will get the return values | 510 | h = 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 |
512 | SLEEP(0.5) | 512 | SLEEP(0.5) |
513 | print("joining with '" .. h:get_threadname() .. "'") | 513 | print("joining with '" .. h:get_threadname() .. "'") |
514 | local a,b,c,d= h:join() | 514 | local r,a,b,c,d= h:join() |
515 | if h.status == "error" then | 515 | if 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) |
517 | else | 517 | else |
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) | ||
523 | end | 524 | end |
524 | 525 | ||
525 | local nameof_type, nameof_name = lanes.nameof(print) | 526 | local nameof_type, nameof_name = lanes.nameof(print) |