diff options
| author | Benoit Germain <benoit.germain@ubisoft.com> | 2026-02-26 11:25:56 +0100 |
|---|---|---|
| committer | Benoit Germain <benoit.germain@ubisoft.com> | 2026-02-26 11:25:56 +0100 |
| commit | 9e4086da77ae7c7ce8a310b9eb7b9d6324932120 (patch) | |
| tree | 41478afd73e6baf09af8bf9f949cfcbb89800c22 | |
| parent | ccf874bfd0c54e27dcee0e03a4fbdce228630253 (diff) | |
| download | lanes-9e4086da77ae7c7ce8a310b9eb7b9d6324932120.tar.gz lanes-9e4086da77ae7c7ce8a310b9eb7b9d6324932120.tar.bz2 lanes-9e4086da77ae7c7ce8a310b9eb7b9d6324932120.zip | |
More cancellation documentation fixes
| -rw-r--r-- | docs/index.html | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/docs/index.html b/docs/index.html index 11ed3eb..3e3816a 100644 --- a/docs/index.html +++ b/docs/index.html | |||
| @@ -1200,7 +1200,7 @@ | |||
| 1200 | <li><tt>"extended"</tt>: <tt>stack_tbl</tt> is an array of tables containing info gathered with <tt>lua_getinfo()</tt> (<tt>"source"</tt>,<tt>"currentline"</tt>,<tt>"name"</tt>,<tt>"namewhat"</tt>,<tt>"what"</tt>).</li> | 1200 | <li><tt>"extended"</tt>: <tt>stack_tbl</tt> is an array of tables containing info gathered with <tt>lua_getinfo()</tt> (<tt>"source"</tt>,<tt>"currentline"</tt>,<tt>"name"</tt>,<tt>"namewhat"</tt>,<tt>"what"</tt>).</li> |
| 1201 | </ul> | 1201 | </ul> |
| 1202 | </li> | 1202 | </li> |
| 1203 | <li><tt>nil, lanes.cancel_error</tt> if <tt>"hard"</tt>-cancelled during a <a href="#lindas">linda</a> operation (which is nothing more than a special case of the above).</li> | 1203 | <li><tt>nil, lanes.cancel_error</tt> if the lane is in <tt>"cancelled"</tt> status (i.e. it was hard-cancelled, whether via a <a href="#lindas">linda</a> operation, a hook, or <tt>cancel_test()</tt> raising).</li> |
| 1204 | <li><tt>true [, returned-values]</tt>: The return values of the lane function.</li> | 1204 | <li><tt>true [, returned-values]</tt>: The return values of the lane function.</li> |
| 1205 | </ul> | 1205 | </ul> |
| 1206 | If the lane handle obtained from <tt>lanes.gen()</tt> is to-be-closed, closing the value will cause a call to <tt>join()</tt>. | 1206 | If the lane handle obtained from <tt>lanes.gen()</tt> is to-be-closed, closing the value will cause a call to <tt>join()</tt>. |
| @@ -1258,13 +1258,15 @@ | |||
| 1258 | <tt>"soft"</tt>: Cancellation will only cause <tt>cancel_test()</tt> to return <tt>"soft"</tt>, so that the lane can cleanup manually. | 1258 | <tt>"soft"</tt>: Cancellation will only cause <tt>cancel_test()</tt> to return <tt>"soft"</tt>, so that the lane can cleanup manually. |
| 1259 | <br /> | 1259 | <br /> |
| 1260 | The <a href="#lindas">linda</a> will also check for cancellation inside blocking calls to early out based on its <tt>wake_period</tt>. | 1260 | The <a href="#lindas">linda</a> will also check for cancellation inside blocking calls to early out based on its <tt>wake_period</tt>. |
| 1261 | <br /> | ||
| 1262 | <tt>wake_lane</tt> defaults to <tt>false</tt>. | ||
| 1261 | </li> | 1263 | </li> |
| 1262 | <li> | 1264 | <li> |
| 1263 | <tt>"hard"</tt>: waits for the request to be processed, or a timeout to occur. <a href="#lindas">linda</a> operations detecting the cancellation request will raise a special cancellation error (meaning they won't return in that case). | 1265 | <tt>"hard"</tt>: waits for the request to be processed, or a timeout to occur. <a href="#lindas">linda</a> operations detecting the cancellation request will raise a special cancellation error (meaning they won't return in that case). |
| 1264 | <br /> | 1266 | <br /> |
| 1265 | If the lane isn't actually waiting on a <a href="#lindas">linda</a> when the request is issued, a lane calling <tt>cancel_test()</tt> will also raise <tt>lanes.cancel_error</tt>, unless <tt>cancel_test(true)</tt> is used, in which case it returns <tt>"hard"</tt> instead. | 1267 | If the lane isn't actually waiting on a <a href="#lindas">linda</a> when the request is issued, a lane calling <tt>cancel_test()</tt> will also raise <tt>lanes.cancel_error</tt>, unless <tt>cancel_test(true)</tt> is used, in which case it returns <tt>"hard"</tt> instead. |
| 1266 | <br /> | 1268 | <br /> |
| 1267 | <tt>wake_lane</tt> defaults to <tt>true</tt>, and <tt>timeout</tt> defaults to infinite if not specified. | 1269 | <tt>wake_lane</tt> defaults to <tt>true</tt>. |
| 1268 | </li> | 1270 | </li> |
| 1269 | <li> | 1271 | <li> |
| 1270 | <tt>"call"</tt>, <tt>"ret"</tt>, <tt>"line"</tt>, <tt>"count"</tt>: Asynchronously install the corresponding hook, then behave as <tt>"hard"</tt>. | 1272 | <tt>"call"</tt>, <tt>"ret"</tt>, <tt>"line"</tt>, <tt>"count"</tt>: Asynchronously install the corresponding hook, then behave as <tt>"hard"</tt>. |
