diff options
Diffstat (limited to '')
-rw-r--r-- | docs/index.html | 29 |
1 files changed, 16 insertions, 13 deletions
diff --git a/docs/index.html b/docs/index.html index 19cc442..0d97c29 100644 --- a/docs/index.html +++ b/docs/index.html | |||
@@ -280,12 +280,14 @@ | |||
280 | <th style="width:70%">definition</th> | 280 | <th style="width:70%">definition</th> |
281 | </tr> | 281 | </tr> |
282 | <tr valign=top> | 282 | <tr valign=top> |
283 | <td id="nb_keepers"> | 283 | <td id="nb_user_keepers"> |
284 | <code>.nb_keepers</code> | 284 | <code>.nb_user_keepers</code> |
285 | </td> | 285 | </td> |
286 | <td>integer >= 1</td> | 286 | <td>integer in [0,100]</td> |
287 | <td> | 287 | <td> |
288 | Controls the number of keeper states used internally by lindas to transfer data between lanes. (see <a href="#lindas">below</a>). Default is <tt>1</tt>. | 288 | Controls the number of "user" keeper states used internally by lindas to transfer data between lanes. (see <a href="#lindas">below</a>). Default is <tt>0</tt>.<br/> |
289 | Lanes always creates at least one keeper state for the internal timer linda. If <tt>nb_user_keepers</tt> is <tt>0</tt>, the other lindas you create will share this keeper by necessity.<br/> | ||
290 | If there is more than one keeper (in total), linda creation must specify the group it belongs to. | ||
289 | </td> | 291 | </td> |
290 | </tr> | 292 | </tr> |
291 | 293 | ||
@@ -712,8 +714,8 @@ | |||
712 | </td> | 714 | </td> |
713 | <td>table</td> | 715 | <td>table</td> |
714 | <td> | 716 | <td> |
715 | Lists modules that have to be required in order to be able to transfer functions they exposed. Starting with Lanes 3.0-beta, non-Lua functions are no longer copied by recreating a C closure from a C pointer, but are <a href="#function_notes">searched in lookup tables</a>. | 717 | Lists modules that have to be required in order to be able to transfer functions they exposed. Non-Lua functions are <a href="#function_notes">searched in lookup tables</a>. |
716 | These tables are built from the modules listed here. <tt>required</tt> must be a list of strings, each one being the name of a module to be required. Each module is required with <tt>require()</tt> before the lanes function is invoked. | 718 | These tables are built from the modules listed here. <tt>required</tt> must be an array of strings, each one being the name of a module to be required. Each module is required with <tt>require()</tt> before the lanes function is invoked. |
717 | So, from the required module's point of view, requiring it manually from inside the lane body or having it required this way doesn't change anything. From the lane body's point of view, the only difference is that a module not creating a global won't be accessible. | 719 | So, from the required module's point of view, requiring it manually from inside the lane body or having it required this way doesn't change anything. From the lane body's point of view, the only difference is that a module not creating a global won't be accessible. |
718 | Therefore, a lane body will also have to require a module manually, but this won't do anything more (see Lua's <tt>require</tt> documentation). <br/> | 720 | Therefore, a lane body will also have to require a module manually, but this won't do anything more (see Lua's <tt>require</tt> documentation). <br/> |
719 | ATTEMPTING TO TRANSFER A FUNCTION REGISTERED BY A MODULE NOT LISTED HERE WILL RAISE AN ERROR. | 721 | ATTEMPTING TO TRANSFER A FUNCTION REGISTERED BY A MODULE NOT LISTED HERE WILL RAISE AN ERROR. |
@@ -773,10 +775,10 @@ | |||
773 | </table> | 775 | </table> |
774 | 776 | ||
775 | <p> | 777 | <p> |
776 | Each lane gets a global function <tt>set_debug_threadname()</tt> that it can use anytime to do as the name says. Supported debuggers are Microsoft Visual Studio (for the C side) and <a href="https://github.com/unknownworlds/decoda">Decoda</a> (for the Lua side).<br/> | 778 | Each lane gets a global function <tt>set_debug_threadname()</tt> that it can use anytime to do as the name says. Supported debuggers are Microsoft Visual Studio (for the C side) and <a href="https://github.com/unknownworlds/decoda">Decoda</a> (for the Lua side).<br /> |
777 | Decoda support is limited to setting a special global variable <tt>decoda_name</tt>. This is disabled by default. Change <tt>HAVE_DECODA_NAME()</tt> in <tt>lanesconf.h</tt> if necessary.<br/> | 779 | Change <tt>HAVE_DECODA_SUPPORT()</tt> in <tt>lanesconf.h</tt> to enable the Decoda support, that sets a special global variable <tt>decoda_name</tt> in the lane's state.<br/> |
778 | The name is stored inside the Lua state registry so that it is available for error reporting. Changing <tt>decoda_name</tt> doesn't affect this hidden name or the OS thread name reported by MSVC.<br/> | 780 | The name is stored inside the Lua state registry so that it is available for error reporting. Changing <tt>decoda_name</tt> doesn't affect this hidden name or the OS thread name reported by MSVC.<br/> |
779 | When Lanes is initialized by the first <a href="#initialization"><tt>lanes.configure()</tt></a> call, <tt>"main"</tt> is stored in the registry in the same fashion (but <tt>decoda_name</tt> and the OS thread name are left unchanged).<br/> | 781 | When Lanes is initialized by the first <a href="#initialization"><tt>lanes.configure()</tt></a> call, <tt>"main"</tt> is stored in the registry in the same fashion (but <tt>decoda_name</tt> and the OS thread name are left unchanged).<br /> |
780 | The lane also has a method <tt>lane:get_debug_threadname()</tt> that gives access to that name from the caller side (returns <tt>"<unnamed>"</tt> if unset, <tt>"<closed>"</tt> if the internal Lua state is closed). | 782 | The lane also has a method <tt>lane:get_debug_threadname()</tt> that gives access to that name from the caller side (returns <tt>"<unnamed>"</tt> if unset, <tt>"<closed>"</tt> if the internal Lua state is closed). |
781 | </p> | 783 | </p> |
782 | 784 | ||
@@ -1186,7 +1188,8 @@ | |||
1186 | <li><tt>receive</tt> has a batched mode to consume more than one value from a single key, as in <tt>linda:receive(1.0, linda.batched, "key", 3, 6).</tt></li> | 1188 | <li><tt>receive</tt> has a batched mode to consume more than one value from a single key, as in <tt>linda:receive(1.0, linda.batched, "key", 3, 6).</tt></li> |
1187 | <li>individual keys' queue length can be limited, balancing speed differences in a producer/consumer scenario (making <tt>:send</tt> wait).</li> | 1189 | <li>individual keys' queue length can be limited, balancing speed differences in a producer/consumer scenario (making <tt>:send</tt> wait).</li> |
1188 | <li><tt>tostring(linda)</tt> returns a string of the form <tt>"Linda: <opt_name>"</tt></li> | 1190 | <li><tt>tostring(linda)</tt> returns a string of the form <tt>"Linda: <opt_name>"</tt></li> |
1189 | <li>several lindas may share the same keeper state. State assignation can be controlled with the linda's group (an integer). All lindas belonging to the same group will share the same keeper state. One keeper state may be shared by several groups.</li> | 1191 | <li>Several lindas may share the same keeper state. In case there is more than one user keeper state, assignation must be controlled with the linda's group (an integer in <tt>[0,nb_user_keepers]</tt>). |
1192 | Lanes has an internal linda used for timers and <tt>lanes.wait</tt>; this linda uses group 0.</li> | ||
1190 | </ul> | 1193 | </ul> |
1191 | </p> | 1194 | </p> |
1192 | 1195 | ||
@@ -1299,7 +1302,8 @@ | |||
1299 | </pre></td></tr></table> | 1302 | </pre></td></tr></table> |
1300 | 1303 | ||
1301 | <p> | 1304 | <p> |
1302 | Returns a table describing the full contents of a linda, or <tt>nil</tt> if the linda wasn't used yet. | 1305 | Returns a table describing the full contents of a linda, or <tt>nil</tt> if the linda wasn't used yet.<br/> |
1306 | If Decoda support is enabled with <tt>HAVE_DECODA_SUPPORT()</tt>, linda metatable contain a <tt>__towatch</tt> special function that generates a similar table used for debug display. | ||
1303 | </p> | 1307 | </p> |
1304 | 1308 | ||
1305 | <table border="1" bgcolor="#E0E0FF" cellpadding="10" style="width:50%"><tr><td><pre> | 1309 | <table border="1" bgcolor="#E0E0FF" cellpadding="10" style="width:50%"><tr><td><pre> |
@@ -1359,8 +1363,7 @@ On the other side, you need to use a common Linda for waiting for multiple keys. | |||
1359 | </p> | 1363 | </p> |
1360 | 1364 | ||
1361 | <p> | 1365 | <p> |
1362 | <font size="-1">Actually, you can. Make separate lanes to wait each, and then multiplex those | 1366 | <font size="-1">Actually, you can. Make separate lanes to wait each, and then multiplex those events to a common Linda, but... :).</font> |
1363 | events to a common Linda, but... :).</font> | ||
1364 | </p> | 1367 | </p> |
1365 | 1368 | ||
1366 | 1369 | ||