diff options
author | Benoit Germain <bnt period germain arrobase gmail period com> | 2014-02-13 16:09:15 +0100 |
---|---|---|
committer | Benoit Germain <bnt period germain arrobase gmail period com> | 2014-02-13 16:09:15 +0100 |
commit | 3786716e6ddab0c0a01b58b286bc9573149536a6 (patch) | |
tree | 5aa7e91050f3fe3690f40b723dced9b86e514bf2 | |
parent | 6529cec6845443924f56f82a82d88a8102b30479 (diff) | |
download | lanes-3786716e6ddab0c0a01b58b286bc9573149536a6.tar.gz lanes-3786716e6ddab0c0a01b58b286bc9573149536a6.tar.bz2 lanes-3786716e6ddab0c0a01b58b286bc9573149536a6.zip |
more fixes/tweaks about cancelled lindas
* bumped version to 3.8.5
* linda:limit() returns lanes.cancel_error on a limited linda
* lanes.genlock() and lanes.genatomic() support cancelled lindas by
returning lanes.cancel_error whenever appropriate
* fixed a possible Lua stack overflow when calling linda:dump()
* fixed cases where linda:send() and linda:receive() would not return
lanes.cancel_error when they should
-rw-r--r-- | index.html | 14 |
1 files changed, 7 insertions, 7 deletions
@@ -70,7 +70,7 @@ | |||
70 | </p> | 70 | </p> |
71 | 71 | ||
72 | <p> | 72 | <p> |
73 | This document was revised on 10-Feb-14, and applies to version <tt>3.8.4</tt>. | 73 | This document was revised on 13-Feb-14, and applies to version <tt>3.8.5</tt>. |
74 | </p> | 74 | </p> |
75 | </font> | 75 | </font> |
76 | </center> | 76 | </center> |
@@ -1039,7 +1039,7 @@ | |||
1039 | 1039 | ||
1040 | [key, val [, ...]]|[lanes.cancel_error] = h:receive( timeout, h.batched, key, n_uint_min[, n_uint_max]) | 1040 | [key, val [, ...]]|[lanes.cancel_error] = h:receive( timeout, h.batched, key, n_uint_min[, n_uint_max]) |
1041 | 1041 | ||
1042 | [true] = h:limit( key, n_uint) | 1042 | [true|lanes.cancel_error] = h:limit( key, n_uint) |
1043 | </pre></td></tr></table> | 1043 | </pre></td></tr></table> |
1044 | 1044 | ||
1045 | <p> | 1045 | <p> |
@@ -1288,11 +1288,11 @@ events to a common Linda, but... :).</font> | |||
1288 | </p> | 1288 | </p> |
1289 | 1289 | ||
1290 | <table border="1" bgcolor="#E0E0FF" cellpadding="10" style="width:50%"><tr><td><pre> | 1290 | <table border="1" bgcolor="#E0E0FF" cellpadding="10" style="width:50%"><tr><td><pre> |
1291 | lock_func = lanes.genlock( linda_h, key [,N_uint=1]) | 1291 | lock_func|lanes.cancel_error = lanes.genlock( linda_h, key [,N_uint=1]) |
1292 | 1292 | ||
1293 | bool = lock_func( M_uint [, "try"] ) -- acquire | 1293 | bool|lanes.cancel_error = lock_func( M_uint [, "try"] ) -- acquire |
1294 | .. | 1294 | .. |
1295 | bool = lock_func( -M_uint) -- release | 1295 | bool|lanes.cancel_error = lock_func( -M_uint) -- release |
1296 | </pre></td></tr></table> | 1296 | </pre></td></tr></table> |
1297 | 1297 | ||
1298 | <p> | 1298 | <p> |
@@ -1314,9 +1314,9 @@ events to a common Linda, but... :).</font> | |||
1314 | <p> | 1314 | <p> |
1315 | 1315 | ||
1316 | <table border="1" bgcolor="#E0E0FF" cellpadding="10" style="width:50%"><tr><td><pre> | 1316 | <table border="1" bgcolor="#E0E0FF" cellpadding="10" style="width:50%"><tr><td><pre> |
1317 | atomic_func = lanes.genatomic( linda_h, key [,initial_num=0.0]) | 1317 | atomic_func|lanes.cancel_error = lanes.genatomic( linda_h, key [,initial_num=0.0]) |
1318 | 1318 | ||
1319 | new_num = atomic_func( [diff_num=+1.0]) | 1319 | new_num|lanes.cancel_error = atomic_func( [diff_num=+1.0]) |
1320 | </pre></td></tr></table> | 1320 | </pre></td></tr></table> |
1321 | 1321 | ||
1322 | <p> | 1322 | <p> |