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/tobeclosed.lua | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'tests/tobeclosed.lua') diff --git a/tests/tobeclosed.lua b/tests/tobeclosed.lua index 447b936..fd157e2 100644 --- a/tests/tobeclosed.lua +++ b/tests/tobeclosed.lua @@ -106,7 +106,7 @@ do local _count, l_out = l:get("trip") -- linda from arguments local l_arg = l_arg_ - return true + return "done" end local close_handler_f = function(linda_, err_) @@ -118,7 +118,8 @@ do l:set("trip", l_in) do - lanes.gen("*", { name = 'auto' }, lane_body)(l_in):join() + local r, ret = lanes.gen("*", { name = 'auto' }, lane_body)(l_in):join() + assert(r == true and ret == "done") end local _count, _closed = l_in:get("closed") assert(_count == 1 and _closed == 2) -- cgit v1.2.3-55-g6feb