From 72d7b36e020fd3f11ec002c110e7340f667d6628 Mon Sep 17 00:00:00 2001
From: Benoit Germain
Date: Thu, 3 Jul 2025 18:11:13 +0200
Subject: Fix more issues related to suspended coroutines and join/indexing
operations
* indexing and joining a suspended lane closes the coroutine, causing the termination of the lane
* properly close coroutine to-be-closed variables on interruption
---
docs/index.html | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
(limited to 'docs')
diff --git a/docs/index.html b/docs/index.html
index ebb93d3..f6201cc 100644
--- a/docs/index.html
+++ b/docs/index.html
@@ -71,7 +71,7 @@
- This document was revised on 26-Jun-25, and applies to version 4.0.0.
+ This document was revised on 03-Jul-25, and applies to version 4.0.0.
@@ -922,8 +922,9 @@
- Coroutine lanes function mostly like regular coroutines. They can use coroutine.yield() normally, in which case the yielded values can be obtained with regular lane indexing (see Results and errors).
- A yielded coroutine lane has a "suspended" status. It can be resumed with lane_h:resume(values...).
+ Coroutine lanes function mostly like regular coroutines. They can use coroutine.yield() normally.
+ A yielded coroutine lane has a "suspended" status. It can be resumed with lane_h:resume(values...), which returns the yielded values.
+ The latter can also be the returned values of lane_h:join() or accessed by regular lane indexing (see Results and errors).
- The reply values are returned to the lane body at the coroutine.yield() point.
- If the yielded values were previously obtained by lane indexing, resume() returns nil.
+ Just like regulare coroutines, the reply values passed to h:resume() are returned to the lane body at the coroutine.yield() point.
+ If a coroutine lane is suspended when it is joined either by indexing or lane_h:join(), active to-be-closed variables are closed at that point, and the Lane can no longer be resumed.
Free running lanes
--
cgit v1.2.3-55-g6feb