diff options
| author | Benoit Germain <benoit.germain@ubisoft.com> | 2025-06-05 16:03:22 +0200 |
|---|---|---|
| committer | Benoit Germain <benoit.germain@ubisoft.com> | 2025-06-05 16:03:22 +0200 |
| commit | bfdc7a92c4e3e99522abb6d90ef2cbb021f36fc8 (patch) | |
| tree | 00f6633878b21dda6cad1177d5619a501b4ac0a4 /tests/finalizer.lua | |
| parent | f73702bcf4372a149b8b01a512c0e086b1e679e2 (diff) | |
| download | lanes-bfdc7a92c4e3e99522abb6d90ef2cbb021f36fc8.tar.gz lanes-bfdc7a92c4e3e99522abb6d90ef2cbb021f36fc8.tar.bz2 lanes-bfdc7a92c4e3e99522abb6d90ef2cbb021f36fc8.zip | |
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
Diffstat (limited to 'tests/finalizer.lua')
| -rw-r--r-- | tests/finalizer.lua | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/finalizer.lua b/tests/finalizer.lua index ac5ce8b..9fa12dc 100644 --- a/tests/finalizer.lua +++ b/tests/finalizer.lua | |||
| @@ -77,8 +77,8 @@ local do_test = function(error_) | |||
| 77 | 77 | ||
| 78 | local h = lgen(error_) | 78 | local h = lgen(error_) |
| 79 | 79 | ||
| 80 | local _,err,stack = h:join() -- wait for the lane (no automatic error propagation) | 80 | local r,err,stack = h:join() -- wait for the lane (no automatic error propagation) |
| 81 | if err then | 81 | if not r then |
| 82 | assert(stack, "no stack trace on error, check 'error_trace_level'") | 82 | assert(stack, "no stack trace on error, check 'error_trace_level'") |
| 83 | io.stderr:write( "Lane error: "..tostring(err).."\n" ) | 83 | io.stderr:write( "Lane error: "..tostring(err).."\n" ) |
| 84 | io.stderr:write( "\t", table.concat(stack,"\t\n"), "\n" ) | 84 | io.stderr:write( "\t", table.concat(stack,"\t\n"), "\n" ) |
