From 7f7b29063d2f19a8bc2b229ae9b0ec82ce447cab Mon Sep 17 00:00:00 2001 From: Benoit Germain Date: Tue, 13 Aug 2013 08:12:05 +0200 Subject: version 3.6.3 * lane:cancel() 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 --- docs/index.html | 35 +++++++++++++++++++++++++++-------- 1 file changed, 27 insertions(+), 8 deletions(-) (limited to 'docs') 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 @@

- This document was revised on 20-May-13, and applies to version 3.6.2. + This document was revised on 02-Aug-13, and applies to version 3.6.3.

@@ -292,6 +292,19 @@ + + + .verbose_errors + + + nil/false/true + + + (Since v3.6.3) If equal to true, Lanes will collect more information when transfering stuff across Lua states to help identify errors (with a cost). + Default is false. + + + .protect_allocator @@ -539,7 +552,7 @@ integer >= 1/true - By default, lanes are only cancellable when they enter a pending :receive() or :send() call. With this option, one can set cancellation check to occur every N Lua statements. The value true uses a default value (100). + By default, lanes are only cancellable when they enter a pending :receive() or :send() call. With this option, one can set cancellation check to occur every N Lua statements. The value true uses a default value (100). It is also possible to manually test for cancel requests with cancel_test(). @@ -705,7 +718,7 @@ - received cancellation and finished itself. + received cancellation and finished itself. @@ -833,8 +846,10 @@

- cancel()sends a cancellation request to the lane. If timeout_secs is non-zero, waits for the request to be processed, or a timeout to occur. - Returns true if the lane was already done (in "done", "error" or "cancelled" status) or if the cancellation was fruitful within timeout period. + cancel()sends a cancellation request to the lane.
+ If timeout_secs is positive (aka "hard cancel"), waits for the request to be processed, or a timeout to occur.
+ If timeout_secs is negative (aka "soft cancel"), starting with version 3.6.3, will only cause cancel_test() to return true, so that the lane can cleanup manually. You can't provide a second argument in that case.
+ Returns true if soft cancelling, or the lane was already done (in "done", "error" or "cancelled" status), or the cancellation was fruitful within timeout period.

@@ -887,7 +902,7 @@ -- no special error: true error print( " error: "..tostring(err)) elseif type( err) == "userdata" then - -- lane cancellation is performed by throwing a special userdata as error + -- lane cancellation is performed by throwing a special userdata as error print( "after cancel") else -- no error: we just got finalized @@ -977,11 +992,15 @@

- send returns true if the sending succeeded, and false if the queue limit was met, and the queue did not empty enough during the given timeout, or the operation was cancelled. + Hard cancellation will cause pending linda operations to abort execution of the lane through a cancellation error. This means that you have to install a finalizer in your lane if you want to run some code in that situation. +

+ +

+ send returns true if the sending succeeded, and false if the queue limit was met, and the queue did not empty enough during the given timeout.

- Equally, receive returns a key and the value extracted from it, or nothing for timeout or cancellation. Note that nils can be sent and received; the key value will tell it apart from a timeout. + Equally, receive returns a key and the value extracted from it, or nothing for timeout. Note that nils can be sent and received; the key value will tell it apart from a timeout.
Version 3.4.0 introduces an API change in the returned values: receive returns the key followed by the value(s), in that order, and not the other way around.

-- cgit v1.2.3-55-g6feb