From bfdc7a92c4e3e99522abb6d90ef2cbb021f36fc8 Mon Sep 17 00:00:00 2001 From: Benoit Germain Date: Thu, 5 Jun 2025 16:03:22 +0200 Subject: Change lane:join() return values * when no error is raised in the lane, lane:join() now precedes the lane returned values with true * lane body is no longer forced to return something when used with join() * adjusted all relevant unit tests accordingly --- tests/linda_perf.lua | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'tests/linda_perf.lua') diff --git a/tests/linda_perf.lua b/tests/linda_perf.lua index 83b8921..e68d552 100644 --- a/tests/linda_perf.lua +++ b/tests/linda_perf.lua @@ -56,7 +56,7 @@ local eater = function( l, loop) -- print "loop is over" key, val = l:receive( "done") print("eater: done ("..val..")") - return true + return "ate everything" end -- ################################################################################################# @@ -74,7 +74,7 @@ local gobbler = function( l, loop, batch) print "loop is over" key, val = l:receive( "done") print("gobbler: done ("..val..")") - return true + return "gobbled everything" end -- ################################################################################################# @@ -123,7 +123,8 @@ local function ziva1( preloop, loop, batch) end end l:send( "done" ,"are you happy?") - lane:join() + local r, ret = lane:join() + assert(r == true and type(ret) == "string", "got " .. tostring(r) .. " " .. tostring(ret)) return lanes.now_secs() - t1 end -- cgit v1.2.3-55-g6feb