aboutsummaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorBenoit Germain <bnt.germain@gmail.com>2011-01-04 21:31:17 +0100
committerBenoit Germain <bnt.germain@gmail.com>2011-01-04 21:31:17 +0100
commit79e46938c5d8daf164ab2d934f668fa27b32e4cf (patch)
tree407761f25bbdc3d5b2066a705dcbcf8711690242 /docs
parented07b457b6b45ece85d367dc8b89bf3c040abd9a (diff)
downloadlanes-79e46938c5d8daf164ab2d934f668fa27b32e4cf.tar.gz
lanes-79e46938c5d8daf164ab2d934f668fa27b32e4cf.tar.bz2
lanes-79e46938c5d8daf164ab2d934f668fa27b32e4cf.zip
Take all code from Asko Kauppi's SVN server, and push it here so that the github repository becomes the official Lanes source codebase.
Note that Asko's SVN server holds version 2.0.9, whereas this is version 2.0.10, but I don't see any real need to update SVN if it is to become deprecated. Next steps: - upgrade the rockspec to the latest version - make the html help available online somewhere Signed-off-by: Benoit Germain <bnt.germain@gmail.com>
Diffstat (limited to 'docs')
-rw-r--r--docs/comparison.html28
-rw-r--r--docs/index.html44
2 files changed, 66 insertions, 6 deletions
diff --git a/docs/comparison.html b/docs/comparison.html
index 84ef9ca..bebc68b 100644
--- a/docs/comparison.html
+++ b/docs/comparison.html
@@ -49,6 +49,7 @@ Pros:
49 49
50Cons: 50Cons:
51 - requires OS threads 51 - requires OS threads
52 - currently 1:1 mapping to OS threads (limits scalability and maybe performance)
52 - not utilizing network parallelism (all threads on one CPU) 53 - not utilizing network parallelism (all threads on one CPU)
53 54
54Sample: 55Sample:
@@ -70,6 +71,31 @@ Sample:
70<< 71<<
71 72
72 73
74===========
75 luaproc (by Skyrme, Rodriguez and Ierusalimschy)
76===========
77
78<A HREF="http://www.inf.puc-rio.br/~roberto/docs/ry08-05.pdf">http://www.inf.puc-rio.br/~roberto/docs/ry08-05.pdf</A>
79
80The PDF seems to be an authorative voyage into how Lua could handle multithreading,
81in a multicore "separate universes" manner (not like what coroutines already do).
82
83Pros:
84 - Tackles both multicore and network parallelism
85 - M:N relationship to kernel threads (one kernel thread runs multiple luaprocs)
86 - Simple (so they say)
87 - Lua author (Roberto) included
88 - Can be used also without _any_ OS threading support (works like Rings, then)
89
90Cons:
91 - Data passing for "strings, number, or booleans" only
92 "More complex types must be encoded in some form"
93 (serializing data is slower than the stack-to-stack copies used by i.e. Lanes)
94 (yet, serializing allows for network parallelism)
95 - Message passing is synchronous (only). The sender will wait until the
96 receiver has taken the message.
97
98
73================== 99==================
74 Lua coroutines (by Lua authors) 100 Lua coroutines (by Lua authors)
75================== 101==================
@@ -157,7 +183,7 @@ but it won't use more than one CPU core. Other differences include:
157 (Lanes opens the needed ones) 183 (Lanes opens the needed ones)
158 184
159 - marshalls numbers, strings, booleans, userdata 185 - marshalls numbers, strings, booleans, userdata
160 (Lanes marshalls also non-cyclic tables) 186 (Lanes also marshalls tables, functions, upvalues, ..)
161 187
162 - "remotedostring" allows executing code in the master state 188 - "remotedostring" allows executing code in the master state
163 (Lanes does _not_ allow subthreads to trouble/modify master automatically, 189 (Lanes does _not_ allow subthreads to trouble/modify master automatically,
diff --git a/docs/index.html b/docs/index.html
index 956e691..45b52bc 100644
--- a/docs/index.html
+++ b/docs/index.html
@@ -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 &copy; 2007-08 Asko Kauppi. All rights reserved.</i> 57<p><br/><font size="-1"><i>Copyright &copy; 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>
367If you want to wait for multiple lanes to finish (any of a set of lanes), use
368a <a href="#lindas">Linda</a> object. Give each lane a specific id, and send
369that 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
378OS thread running the lane is forcefully killed. This means no GC, and should 387OS thread running the lane is forcefully killed. This means no GC, and should
379generally be the last resort. 388generally 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
382and after executing <tt>cancelstep</tt> Lua statements. A currently pending <tt>receive</tt> 391and after executing <tt>cancelstep</tt> Lua statements. A currently pending <tt>receive</tt>
383or <tt>send</tt> call is currently not awakened, and may be a reason for a non-detected cancel. 392or <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>
932Jan-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
941Dec-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
948Aug-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
923Jan-2009 (2.0.3): 956Jan-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