diff options
author | Benoit Germain <bnt period germain arrobase gmail period com> | 2014-02-26 11:53:30 +0100 |
---|---|---|
committer | Benoit Germain <bnt period germain arrobase gmail period com> | 2014-02-26 11:53:30 +0100 |
commit | c0ae89d84d1f784de28a468a1ab3aa2924e7d1a5 (patch) | |
tree | 30d043f720e2f745a1b52c2d8ededce2ab2dbf2a | |
parent | c3eed021da345ff0d55a60ce9252bc86627efad5 (diff) | |
download | lanes-c0ae89d84d1f784de28a468a1ab3aa2924e7d1a5.tar.gz lanes-c0ae89d84d1f784de28a468a1ab3aa2924e7d1a5.tar.bz2 lanes-c0ae89d84d1f784de28a468a1ab3aa2924e7d1a5.zip |
Multiverse compatibility
* bumped version to 3.9.2
* Internal rework: the whole Lanes engine now works "per universe" to
allow concurrent Lanes execution in more than one embedded master state
* this universe is a full userdata created in the master state,
selfdestruct_gc is the __gc for this userdata
* most of what was initialized only once is now per-universe
* Fixed potential crashes at desinit if problems occur during keeper
states initialisation
* Fixed require() not always serialized properly
* Raise an error instead of crashing on deep userdata prelude memory
allocation failure
* Added forgotten mutex desinitialisation at universe shutdown
-rw-r--r-- | comparison.html | 22 | ||||
-rw-r--r-- | index.html | 4 |
2 files changed, 15 insertions, 11 deletions
diff --git a/comparison.html b/comparison.html index bebc68b..8e28f55 100644 --- a/comparison.html +++ b/comparison.html | |||
@@ -32,7 +32,7 @@ With the introduction of Lindas (Jun-2008), Lua Lanes simplifies its API while | |||
32 | simultaneously adding more power and speed. | 32 | simultaneously adding more power and speed. |
33 | 33 | ||
34 | Pros: | 34 | Pros: |
35 | - regular Lua 5.1 module | 35 | - regular Lua 5.1/5.2 module |
36 | - completely separate Lua states, one per OS thread | 36 | - completely separate Lua states, one per OS thread |
37 | - message passing, or shared data using Lindas | 37 | - message passing, or shared data using Lindas |
38 | - no application level locking, ever | 38 | - no application level locking, ever |
@@ -54,7 +54,7 @@ Cons: | |||
54 | 54 | ||
55 | Sample: | 55 | Sample: |
56 | << | 56 | << |
57 | require "lanes" | 57 | lanes = require "lanes".configure() |
58 | 58 | ||
59 | local function calculate(a,b,c) | 59 | local function calculate(a,b,c) |
60 | if not a then | 60 | if not a then |
@@ -63,9 +63,9 @@ Sample: | |||
63 | return a+b+c | 63 | return a+b+c |
64 | end | 64 | end |
65 | 65 | ||
66 | local h1= lanes.new(calculate)(1,2,3) | 66 | local h1= lanes.gen("base", calculate)(1,2,3) |
67 | local h2= lanes.new(calculate)(10,20,30) | 67 | local h2= lanes.new("base", calculate)(10,20,30) |
68 | local h3= lanes.new(calculate)(100,200,300) | 68 | local h3= lanes.new("base", calculate)(100,200,300) |
69 | 69 | ||
70 | print( h1[1], h2[1], h3[1] ) -- pends for the results, or propagates error | 70 | print( h1[1], h2[1], h3[1] ) -- pends for the results, or propagates error |
71 | << | 71 | << |
@@ -304,11 +304,13 @@ Cons: | |||
304 | <!-- footnotes +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ --> | 304 | <!-- footnotes +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ --> |
305 | <hr/> | 305 | <hr/> |
306 | 306 | ||
307 | <p>For feedback, questions and suggestions: | 307 | <p> |
308 | <UL> | 308 | For feedback, questions and suggestions: |
309 | <li><A HREF="http://luaforge.net/projects/lanes">Lanes @ LuaForge</A></li> | 309 | <ul> |
310 | <li><A HREF="mailto:akauppi@gmail.com">the author</A></li> | 310 | <li><A HREF="http://github.com/LuaLanes/lanes">Lanes @ GitHub</A></li> |
311 | </UL> | 311 | <li><A HREF="mailto:bnt.germain@gmail.com">the maintainer</A></li> |
312 | <li><A HREF="http://www.lua.org/lua-l.html">the lua mailing list</A></li> | ||
313 | </ul> | ||
312 | </p> | 314 | </p> |
313 | 315 | ||
314 | <!-- | 316 | <!-- |
@@ -70,7 +70,7 @@ | |||
70 | </p> | 70 | </p> |
71 | 71 | ||
72 | <p> | 72 | <p> |
73 | This document was revised on 17-Feb-14, and applies to version <tt>3.9.1</tt>. | 73 | This document was revised on 26-Feb-14, and applies to version <tt>3.9.2</tt>. |
74 | </p> | 74 | </p> |
75 | </font> | 75 | </font> |
76 | </center> | 76 | </center> |
@@ -105,6 +105,7 @@ | |||
105 | <li>Threads can be given priorities.</li> | 105 | <li>Threads can be given priorities.</li> |
106 | <li>Lanes are cancellable, with proper cleanup.</li> | 106 | <li>Lanes are cancellable, with proper cleanup.</li> |
107 | <li>No Lua-side application level locking - ever!</li> | 107 | <li>No Lua-side application level locking - ever!</li> |
108 | <li>Several totally independant Lanes universes may coexist in an application, one per "master" Lua state.</li> | ||
108 | </ul> | 109 | </ul> |
109 | 110 | ||
110 | 111 | ||
@@ -114,6 +115,7 @@ | |||
114 | <li>Coroutines are not passed between states.</li> | 115 | <li>Coroutines are not passed between states.</li> |
115 | <li>Sharing full userdata between states needs special C side preparations (-> <A HREF="#deep_userdata">deep userdata</A>).</li> | 116 | <li>Sharing full userdata between states needs special C side preparations (-> <A HREF="#deep_userdata">deep userdata</A>).</li> |
116 | <li>Network level parallelism not included.</li> | 117 | <li>Network level parallelism not included.</li> |
118 | <li>Just like independant Lua states, Lanes universes cannot communicate together.</li> | ||
117 | </ul> | 119 | </ul> |
118 | </p> | 120 | </p> |
119 | 121 | ||