diff options
Diffstat (limited to 'index.html')
-rw-r--r-- | index.html | 44 |
1 files changed, 39 insertions, 5 deletions
@@ -54,9 +54,9 @@ | |||
54 | <a href="#changes">Change log</a> | 54 | <a href="#changes">Change log</a> |
55 | <!-- ... --> | 55 | <!-- ... --> |
56 | 56 | ||
57 | <p><br/><font size="-1"><i>Copyright © 2007-08 Asko Kauppi. All rights reserved.</i> | 57 | <p><br/><font size="-1"><i>Copyright © 2007-11 Asko Kauppi. All rights reserved.</i> |
58 | <br>Lua Lanes is published under the same <A HREF="http://en.wikipedia.org/wiki/MIT_License">MIT license</A> as Lua 5.1. | 58 | <br>Lua Lanes is published under the same <A HREF="http://en.wikipedia.org/wiki/MIT_License">MIT license</A> as Lua 5.1. |
59 | </p><p>This document was revised on 23-Jan-09, and applies to version 2.0.3. | 59 | </p><p>This document was revised on 3-Jan-11, and applies to version 2.0.10. |
60 | </font></p> | 60 | </font></p> |
61 | 61 | ||
62 | </center> | 62 | </center> |
@@ -195,6 +195,9 @@ joins the threads, waiting for any results not already there. | |||
195 | launching any number of lanes. They will share code, options, initial globals, | 195 | launching any number of lanes. They will share code, options, initial globals, |
196 | but the particular arguments may vary. Only calling the generator function | 196 | but the particular arguments may vary. Only calling the generator function |
197 | actually launches a lane, and provides a handle for controlling it. | 197 | actually launches a lane, and provides a handle for controlling it. |
198 | Alternatively, <tt>lane_func</tt> may be a string, in which case it will be compiled | ||
199 | in the lane. This is to be able to launch lanes whith LuaJIT, | ||
200 | which does not support lua_dump, used internally to transfer functions to the lane. | ||
198 | <!-- | 201 | <!-- |
199 | </p> | 202 | </p> |
200 | <p>This prepares <tt>lane_func</tt> to be called in parallel. It does not yet start | 203 | <p>This prepares <tt>lane_func</tt> to be called in parallel. It does not yet start |
@@ -237,7 +240,7 @@ also in the new lanes. | |||
237 | <tr valign=top><td/><td> | 240 | <tr valign=top><td/><td> |
238 | <code>.cancelstep</code> <br/><nobr>N / true</nobr></td> | 241 | <code>.cancelstep</code> <br/><nobr>N / true</nobr></td> |
239 | <td> | 242 | <td> |
240 | By default, lanes are only cancellable when they enter a pending | 243 | By default, lanes are only cancellable when they <u>enter</u> a pending |
241 | <tt>:receive()</tt> or <tt>:send()</tt> call. | 244 | <tt>:receive()</tt> or <tt>:send()</tt> call. |
242 | With this option, one can set cancellation check to occur every <tt>N</tt> | 245 | With this option, one can set cancellation check to occur every <tt>N</tt> |
243 | Lua statements. The value <tt>true</tt> uses a default value (100). | 246 | Lua statements. The value <tt>true</tt> uses a default value (100). |
@@ -250,7 +253,7 @@ also in the new lanes. | |||
250 | them constants. | 253 | them constants. |
251 | </p><p> | 254 | </p><p> |
252 | The global values of different lanes are in no manner connected; | 255 | The global values of different lanes are in no manner connected; |
253 | modifying one will only affect the particular lane. | 256 | modifying one will only affect the particular lane. Settings the variable 'threadName' in this table makes VS display the sent name instead of the normal thread name while debugging. |
254 | </td></tr> | 257 | </td></tr> |
255 | 258 | ||
256 | <tr valign=top><td width=40><td> | 259 | <tr valign=top><td width=40><td> |
@@ -360,6 +363,12 @@ between a timed out join and the moment you read it). | |||
360 | </pre> | 363 | </pre> |
361 | </table> | 364 | </table> |
362 | 365 | ||
366 | <p> | ||
367 | If you want to wait for multiple lanes to finish (any of a set of lanes), use | ||
368 | a <a href="#lindas">Linda</a> object. Give each lane a specific id, and send | ||
369 | that id over a Linda once that thread is done (as the last thing you do). | ||
370 | </p> | ||
371 | |||
363 | 372 | ||
364 | <!-- cancelling +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ --> | 373 | <!-- cancelling +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ --> |
365 | <hr/> | 374 | <hr/> |
@@ -378,7 +387,7 @@ If the lane is still running and <tt>force_kill</tt> is <tt>true</tt>, the | |||
378 | OS thread running the lane is forcefully killed. This means no GC, and should | 387 | OS thread running the lane is forcefully killed. This means no GC, and should |
379 | generally be the last resort. | 388 | generally be the last resort. |
380 | </p> | 389 | </p> |
381 | <p>Cancellation is tested before going to sleep in <tt>receive()</tt> or <tt>send()</tt> calls | 390 | <p>Cancellation is tested <u>before</u> going to sleep in <tt>receive()</tt> or <tt>send()</tt> calls |
382 | and after executing <tt>cancelstep</tt> Lua statements. A currently pending <tt>receive</tt> | 391 | and after executing <tt>cancelstep</tt> Lua statements. A currently pending <tt>receive</tt> |
383 | or <tt>send</tt> call is currently not awakened, and may be a reason for a non-detected cancel. | 392 | or <tt>send</tt> call is currently not awakened, and may be a reason for a non-detected cancel. |
384 | </p> | 393 | </p> |
@@ -920,6 +929,30 @@ its actual value. | |||
920 | <h2 id="changes">Change log</h2> | 929 | <h2 id="changes">Change log</h2> |
921 | 930 | ||
922 | <p> | 931 | <p> |
932 | Jan-2011 (2.0.10): | ||
933 | <ul> | ||
934 | <li>linda_send was waiting on the wrong signal</li> | ||
935 | <li>buildfix when using i586-mingw32msvc-gcc cross compiler</li> | ||
936 | <li>lanes_h:cancel() returns a boolean as it should</li> | ||
937 | <li>timers could get blocked sometimes because they were initialized with negative values</li> | ||
938 | <li>prepare_timeout could generate an illegal setting</li> | ||
939 | </ul> | ||
940 | |||
941 | Dec-2010 (2.0.9): | ||
942 | <ul> | ||
943 | <li>Fixed 'memory leak' in some situations where a free running lane is collected before application shutdown</li> | ||
944 | <li>Fix LuaJIT2 incompatibility (no 'tostring' hijack anymore)</li> | ||
945 | <li>Added support to generate a lane from a string</li> | ||
946 | </ul> | ||
947 | |||
948 | Aug-2010 (2.0.6): | ||
949 | <ul> | ||
950 | <li>Fixed some memory leaks</li> | ||
951 | <li>Fixed error in passing parameters to finalizers</li> | ||
952 | <li>Fixed missing argument propagation in lane:cancel</li> | ||
953 | <li>Added thread name debugging in VS</li> | ||
954 | </ul> | ||
955 | |||
923 | Jan-2009 (2.0.3): | 956 | Jan-2009 (2.0.3): |
924 | <ul> | 957 | <ul> |
925 | <li>Added 'finalizer' to lane options. (TBD: not implemented yet!) | 958 | <li>Added 'finalizer' to lane options. (TBD: not implemented yet!) |
@@ -942,6 +975,7 @@ Jul-2008 (2.0): | |||
942 | <UL> | 975 | <UL> |
943 | <li><A HREF="http://luaforge.net/projects/lanes">Lanes @ LuaForge</A></li> | 976 | <li><A HREF="http://luaforge.net/projects/lanes">Lanes @ LuaForge</A></li> |
944 | <li><A HREF="mailto:akauppi@gmail.com">the author</A></li> | 977 | <li><A HREF="mailto:akauppi@gmail.com">the author</A></li> |
978 | <li><A HREF="http://www.lua.org/lua-l.html">the lua mailing list</A></li> | ||
945 | </UL> | 979 | </UL> |
946 | </p> | 980 | </p> |
947 | 981 | ||