From 84294d0b5462d0a05fb5d53df5a64f7ee624a726 Mon Sep 17 00:00:00 2001 From: Benoit Germain Date: Tue, 11 Jun 2024 11:36:15 +0200 Subject: Fixes and improvements to lane:join() * fix: returns nil,cancel_error when lane was cancelled * improvement: enforce non-nil first return value of lane body when using lane:join() to obtain the results --- docs/index.html | 36 +++++++++++++++++------------------- 1 file changed, 17 insertions(+), 19 deletions(-) (limited to 'docs') diff --git a/docs/index.html b/docs/index.html index 4e8cc25..400ceb1 100644 --- a/docs/index.html +++ b/docs/index.html @@ -991,25 +991,23 @@

- timeout is an optional number >= 0 (the default if unspecified). -
- Waits until the lane finishes, or timeout seconds have passed. -
- Returns nil, "timeout" on timeout, nil,err,stack_tbl if the lane hit an error, nil, "killed" if forcefully killed, or the return values of the lane. -
- Unlike in reading the results in table fashion, errors are not propagated. -

- -

-stack_tbl is a table describing where the error was thrown. -
- In "extended" mode, stack_tbl is an array of tables containing info gathered with lua_getinfo() ("source","currentline","name","namewhat","what"). -
- In "basic" mode, stack_tbl is an array of "<filename>:<line>" strings. Use table.concat() to format it to your liking (or just ignore it). -

- -

- If you use :join(), make sure your lane main function returns a non-nil value so you can tell timeout and error cases apart from succesful return (using the .status property may be risky, since it might change between a timed out join and the moment you read it). + timeout is an optional number >= 0 (the default if unspecified).
+ Waits until the lane finishes, or timeout seconds have passed.
+ Unlike in reading the results in table fashion, errors are not propagated.
+ Possible return values are: +

-- 
cgit v1.2.3-55-g6feb