diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/basic.lua | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/tests/basic.lua b/tests/basic.lua index 1f4eb1e..5b0d8a7 100644 --- a/tests/basic.lua +++ b/tests/basic.lua | |||
@@ -413,6 +413,8 @@ PRINT( "\n\n", "---=== :join test ===---", "\n\n") | |||
413 | 413 | ||
414 | local S= lanes_gen( "table", | 414 | local S= lanes_gen( "table", |
415 | function(arg) | 415 | function(arg) |
416 | set_debug_threadname "join test lane" | ||
417 | set_finalizer( function() end) | ||
416 | aux= {} | 418 | aux= {} |
417 | for i, v in ipairs(arg) do | 419 | for i, v in ipairs(arg) do |
418 | table.insert (aux, 1, v) | 420 | table.insert (aux, 1, v) |
@@ -422,11 +424,14 @@ local S= lanes_gen( "table", | |||
422 | end ) | 424 | end ) |
423 | 425 | ||
424 | h= S { 12, 13, 14 } -- execution starts, h[1..3] will get the return values | 426 | h= S { 12, 13, 14 } -- execution starts, h[1..3] will get the return values |
425 | 427 | -- wait a bit so that the lane hasa chance to set its debug name | |
428 | linda:receive(0.5, "gloupti") | ||
429 | print( "joining with '" .. h:get_debug_threadname() .. "'") | ||
426 | local a,b,c,d= h:join() | 430 | local a,b,c,d= h:join() |
427 | if h.status == "error" then | 431 | if h.status == "error" then |
428 | print( "h error: " , a, b, c, d) | 432 | print( h:get_debug_threadname(), "error: " , a, b, c, d) |
429 | else | 433 | else |
434 | print( h:get_debug_threadname(), a,b,c,d) | ||
430 | assert(a==14) | 435 | assert(a==14) |
431 | assert(b==13) | 436 | assert(b==13) |
432 | assert(c==12) | 437 | assert(c==12) |