aboutsummaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorBenoit Germain <benoit.germain@ubisoft.com>2025-07-03 18:11:13 +0200
committerBenoit Germain <benoit.germain@ubisoft.com>2025-07-03 18:11:13 +0200
commit72d7b36e020fd3f11ec002c110e7340f667d6628 (patch)
tree00b42d89192b1bfa88245224f827544a7c5dbc50 /docs
parent45774df1eeeaae0868420104a4cdad4691995dc9 (diff)
downloadlanes-72d7b36e020fd3f11ec002c110e7340f667d6628.tar.gz
lanes-72d7b36e020fd3f11ec002c110e7340f667d6628.tar.bz2
lanes-72d7b36e020fd3f11ec002c110e7340f667d6628.zip
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
Diffstat (limited to 'docs')
-rw-r--r--docs/index.html11
1 files changed, 6 insertions, 5 deletions
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 @@
71 </p> 71 </p>
72 72
73 <p> 73 <p>
74 This document was revised on 26-Jun-25, and applies to version <tt>4.0.0</tt>. 74 This document was revised on 03-Jul-25, and applies to version <tt>4.0.0</tt>.
75 </p> 75 </p>
76 </font> 76 </font>
77 </center> 77 </center>
@@ -922,8 +922,9 @@
922 </tr> 922 </tr>
923 </table> 923 </table>
924 924
925 Coroutine lanes function mostly like regular coroutines. They can use <tt>coroutine.yield()</tt> normally, in which case the yielded values can be obtained with regular lane indexing (see <a href="#results">Results and errors</a>).<br /> 925 Coroutine lanes function mostly like regular coroutines. They can use <tt>coroutine.yield()</tt> normally.<br />
926 A yielded coroutine lane has a <tt>"suspended"</tt> status. It can be resumed with <tt>lane_h:resume(values...)</tt>. 926 A yielded coroutine lane has a <tt>"suspended"</tt> status. It can be resumed with <tt>lane_h:resume(values...), which returns the yielded values</tt>.
927 The latter can also be the returned values of <tt>lane_h:join()</tt> or accessed by regular lane indexing (see <a href="#results">Results and errors</a>).<br />
927 <table border="1" bgcolor="#FFFFE0" cellpadding="10" style="width:50%"> 928 <table border="1" bgcolor="#FFFFE0" cellpadding="10" style="width:50%">
928 <tr> 929 <tr>
929 <td> 930 <td>
@@ -932,8 +933,8 @@
932 </tr> 933 </tr>
933 </table> 934 </table>
934 935
935 The reply values are returned to the lane body at the <tt>coroutine.yield()</tt> point.<br /> 936 Just like regulare coroutines, the reply values passed to <tt>h:resume()</tt> are returned to the lane body at the <tt>coroutine.yield()</tt> point.<br />
936 If the yielded values were previously obtained by lane indexing, <tt>resume()</tt> returns <tt>nil</tt>. 937 If a coroutine lane is suspended when it is joined either by indexing or <tt>lane_h:join()</tt>, active to-be-closed variables are closed at that point, and the Lane can no longer be resumed.
937</p> 938</p>
938<h3>Free running lanes</h3> 939<h3>Free running lanes</h3>
939 940