aboutsummaryrefslogtreecommitdiff
path: root/docs/index.html
diff options
context:
space:
mode:
authorBenoit Germain <b n t DOT g e r m a i n AT g m a i l DOT c o m>2013-08-13 08:12:05 +0200
committerBenoit Germain <b n t DOT g e r m a i n AT g m a i l DOT c o m>2013-08-13 08:12:05 +0200
commit7f7b29063d2f19a8bc2b229ae9b0ec82ce447cab (patch)
tree296e407a77e7e7f94add52967fe06e09aa7d58f3 /docs/index.html
parenta6f76ba28d7e7e9d2d277a85dfd054cb70c02b69 (diff)
downloadlanes-3.6.3.tar.gz
lanes-3.6.3.tar.bz2
lanes-3.6.3.zip
version 3.6.3v3.6.3
* lane:cancel(<negative-timeout>) only causes cancel_test() to return true but won't interrupt execution of the lane during linda operations * more explicit errors when trying to transfer unknown source functions (with new configure option verbose_errors) * default options wrap allocator around a mutex when run by LuaJIT
Diffstat (limited to 'docs/index.html')
-rw-r--r--docs/index.html35
1 files changed, 27 insertions, 8 deletions
diff --git a/docs/index.html b/docs/index.html
index 617403a..0e32504 100644
--- a/docs/index.html
+++ b/docs/index.html
@@ -70,7 +70,7 @@
70 </p> 70 </p>
71 71
72 <p> 72 <p>
73 This document was revised on 20-May-13, and applies to version <tt>3.6.2</tt>. 73 This document was revised on 02-Aug-13, and applies to version <tt>3.6.3</tt>.
74 </p> 74 </p>
75 </font> 75 </font>
76 </center> 76 </center>
@@ -294,6 +294,19 @@
294 294
295 <tr valign=top> 295 <tr valign=top>
296 <td> 296 <td>
297 <code>.verbose_errors</code>
298 </td>
299 <td>
300 <tt>nil</tt>/<tt>false</tt>/<tt>true</tt>
301 </td>
302 <td>
303 (Since v3.6.3) If equal to <tt>true</tt>, Lanes will collect more information when transfering stuff across Lua states to help identify errors (with a cost).
304 Default is <tt>false</tt>.
305 </td>
306 </tr>
307
308 <tr valign=top>
309 <td>
297 <code>.protect_allocator</code> 310 <code>.protect_allocator</code>
298 </td> 311 </td>
299 <td> 312 <td>
@@ -539,7 +552,7 @@
539 </td> 552 </td>
540 <td>integer >= 1/<tt>true</tt></td> 553 <td>integer >= 1/<tt>true</tt></td>
541 <td> 554 <td>
542 By default, lanes are only cancellable when they <u>enter</u> a pending <tt>:receive()</tt> or <tt>:send()</tt> call. With this option, one can set cancellation check to occur every <tt>N</tt> Lua statements. The value <tt>true</tt> uses a default value (100). 555 By default, lanes are only cancellable when they <u>enter</u> a pending <tt>:receive()</tt> or <tt>:send()</tt> call. With this option, one can set <a href="#cancelling">cancellation</a> check to occur every <tt>N</tt> Lua statements. The value <tt>true</tt> uses a default value (100).
543 It is also possible to manually test for cancel requests with <tt>cancel_test()</tt>. 556 It is also possible to manually test for cancel requests with <tt>cancel_test()</tt>.
544 </td> 557 </td>
545 </tr> 558 </tr>
@@ -705,7 +718,7 @@
705 </td> 718 </td>
706 <td/> 719 <td/>
707 <td> 720 <td>
708 received cancellation and finished itself. 721 received <a href="#cancelling">cancellation</a> and finished itself.
709 </td> 722 </td>
710 </tr> 723 </tr>
711 <tr> 724 <tr>
@@ -833,8 +846,10 @@
833</pre></td></tr></table> 846</pre></td></tr></table>
834 847
835<p> 848<p>
836 <tt>cancel()</tt>sends a cancellation request to the lane. If <tt>timeout_secs</tt> is non-zero, waits for the request to be processed, or a timeout to occur. 849 <tt>cancel()</tt>sends a cancellation request to the lane.<br/>
837 Returns <tt>true</tt> if the lane was already done (in <tt>"done"</tt>, <tt>"error"</tt> or <tt>"cancelled"</tt> status) or if the cancellation was fruitful within timeout period. 850 If <tt>timeout_secs</tt> is positive (aka "hard cancel"), waits for the request to be processed, or a timeout to occur.<br/>
851 If <tt>timeout_secs</tt> is negative (aka "soft cancel"), starting with version 3.6.3, will only cause <tt>cancel_test()</tt> to return true, so that the lane can cleanup manually. You can't provide a second argument in that case.<br/>
852 Returns <tt>true</tt> if soft cancelling, or the lane was already done (in <tt>"done"</tt>, <tt>"error"</tt> or <tt>"cancelled"</tt> status), or the cancellation was fruitful within timeout period.
838</p> 853</p>
839 854
840<p> 855<p>
@@ -887,7 +902,7 @@
887 -- no special error: true error 902 -- no special error: true error
888 print( " error: "..tostring(err)) 903 print( " error: "..tostring(err))
889 elseif type( err) == "userdata" then 904 elseif type( err) == "userdata" then
890 -- lane cancellation is performed by throwing a special userdata as error 905 -- lane <a href="#cancelling">cancellation</a> is performed by throwing a special userdata as error
891 print( "after cancel") 906 print( "after cancel")
892 else 907 else
893 -- no error: we just got finalized 908 -- no error: we just got finalized
@@ -977,11 +992,15 @@
977</p> 992</p>
978 993
979<p> 994<p>
980 <tt>send</tt> returns <tt>true</tt> if the sending succeeded, and <tt>false</tt> if the queue limit was met, and the queue did not empty enough during the given timeout, or the operation was <a href="#cancelling">cancelled</a>. 995 <a href="#cancelling">Hard cancellation</a> will cause pending linda operations to abort execution of the lane through a cancellation error. This means that you have to install a <a href="#finalizers">finalizer</a> in your lane if you want to run some code in that situation.
996</p>
997
998<p>
999 <tt>send</tt> returns <tt>true</tt> if the sending succeeded, and <tt>false</tt> if the queue limit was met, and the queue did not empty enough during the given timeout.
981</p> 1000</p>
982 1001
983<p> 1002<p>
984 Equally, <tt>receive</tt> returns a key and the value extracted from it, or nothing for timeout or <a href="#cancelling">cancellation</a>. Note that <tt>nil</tt>s can be sent and received; the <tt>key</tt> value will tell it apart from a timeout. 1003 Equally, <tt>receive</tt> returns a key and the value extracted from it, or nothing for timeout. Note that <tt>nil</tt>s can be sent and received; the <tt>key</tt> value will tell it apart from a timeout.
985 <br> 1004 <br>
986 Version 3.4.0 introduces an API change in the returned values: <tt>receive</tt> returns the key followed by the value(s), in that order, and not the other way around. 1005 Version 3.4.0 introduces an API change in the returned values: <tt>receive</tt> returns the key followed by the value(s), in that order, and not the other way around.
987</p> 1006</p>