aboutsummaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorBenoit Germain <benoit.germain@ubisoft.com>2024-06-14 17:11:36 +0200
committerBenoit Germain <benoit.germain@ubisoft.com>2024-06-14 17:11:36 +0200
commit50f4c40bdb5667aa7053434dede2dd98f6f9e243 (patch)
treec443c9337e238ff2825b2da4c9749fdf97aa574f /docs
parentec8574d298ef302bc4162d9b394e96bf08763632 (diff)
downloadlanes-50f4c40bdb5667aa7053434dede2dd98f6f9e243.tar.gz
lanes-50f4c40bdb5667aa7053434dede2dd98f6f9e243.tar.bz2
lanes-50f4c40bdb5667aa7053434dede2dd98f6f9e243.zip
Wording fix: parameter → argument
Diffstat (limited to 'docs')
-rw-r--r--docs/index.html12
1 files changed, 6 insertions, 6 deletions
diff --git a/docs/index.html b/docs/index.html
index 06ce610..defb0ad 100644
--- a/docs/index.html
+++ b/docs/index.html
@@ -1137,7 +1137,7 @@
1137<p> 1137<p>
1138 Communications between lanes is completely detached from the lane handles themselves. By itself, a lane can only provide return values once it is finished, or throw an error. 1138 Communications between lanes is completely detached from the lane handles themselves. By itself, a lane can only provide return values once it is finished, or throw an error.
1139 Needs to communicate during runtime are handled by <a href="http://en.wikipedia.org/wiki/Linda_%28coordination_language%29" target="_blank">Linda objects</a>, which are 1139 Needs to communicate during runtime are handled by <a href="http://en.wikipedia.org/wiki/Linda_%28coordination_language%29" target="_blank">Linda objects</a>, which are
1140 <a href="#deep_userdata">deep userdata</a> instances. They can be provided to a lane as startup parameters, upvalues or in some other Linda's message. 1140 <a href="#deep_userdata">deep userdata</a> instances. They can be provided to a lane as startup arguments, upvalues or in some other Linda's message.
1141</p> 1141</p>
1142 1142
1143<p> 1143<p>
@@ -1175,7 +1175,7 @@
1175 1175
1176 <ul> 1176 <ul>
1177 <li>Keys can be of boolean, number, string or light userdata type. Tables and functions can't be keys because their identity isn't preserved when transfered from one Lua state to another.</li> 1177 <li>Keys can be of boolean, number, string or light userdata type. Tables and functions can't be keys because their identity isn't preserved when transfered from one Lua state to another.</li>
1178 <li>values can be any type supported by inter-state copying (same <a href="#limitations">limits</a> as for function parameters and upvalues).</li> 1178 <li>values can be any type supported by inter-state copying (same <a href="#limitations">limits</a> as for function arguments and upvalues).</li>
1179 <li>consuming method is <tt>:receive</tt> (not in).</li> 1179 <li>consuming method is <tt>:receive</tt> (not in).</li>
1180 <li>non-consuming method is <tt>:get</tt> (not rd).</li> 1180 <li>non-consuming method is <tt>:get</tt> (not rd).</li>
1181 <li>two producer-side methods: <tt>:send</tt> and <tt>:set</tt> (not out).</li> 1181 <li>two producer-side methods: <tt>:send</tt> and <tt>:set</tt> (not out).</li>
@@ -1539,7 +1539,7 @@ On the other side, you need to use a common Linda for waiting for multiple keys.
1539<h3>Limitations on data passing</h3> 1539<h3>Limitations on data passing</h3>
1540 1540
1541<p> 1541<p>
1542 Data passed between lanes (either as starting parameters, return values, upvalues or via Lindas) must conform to the following: 1542 Data passed between lanes (either as starting arguments, return values, upvalues or via Lindas) must conform to the following:
1543 <ul> 1543 <ul>
1544 <li>Coroutines cannot be passed. A coroutine's Lua state is tied to the Lua state that created it, and there is no way the mixed C/Lua stack of a coroutine can be transfered from one Lua state to another.</li> 1544 <li>Coroutines cannot be passed. A coroutine's Lua state is tied to the Lua state that created it, and there is no way the mixed C/Lua stack of a coroutine can be transfered from one Lua state to another.</li>
1545 <li>Lane handles cannot be passed between lanes.</li> 1545 <li>Lane handles cannot be passed between lanes.</li>
@@ -1685,7 +1685,7 @@ static int clonable_lanesclone(lua_State* L)
1685 return 0; 1685 return 0;
1686 1686
1687 default: 1687 default:
1688 std::ignore = luaL_error(L, "Lanes called clonable_lanesclone with unexpected parameters"); 1688 std::ignore = luaL_error(L, "Lanes called clonable_lanesclone with unexpected arguments");
1689 } 1689 }
1690 return 0; 1690 return 0;
1691} 1691}
@@ -1800,7 +1800,7 @@ static MyDeepFactory g_MyDeepFactory;
1800<h3>Beware with print and file output</h3> 1800<h3>Beware with print and file output</h3>
1801 1801
1802<p> 1802<p>
1803 In multithreaded scenarios, giving multiple parameters to <tt>print()</tt> or <tt>file:write()</tt> may cause them to be overlapped in the output, something like this: 1803 In multithreaded scenarios, giving multiple arguments to <tt>print()</tt> or <tt>file:write()</tt> may cause them to be overlapped in the output, something like this:
1804 1804
1805<table border="1" bgcolor="#FFFFE0" cellpadding="10" style="width:50%"><tr><td><pre> 1805<table border="1" bgcolor="#FFFFE0" cellpadding="10" style="width:50%"><tr><td><pre>
1806 A: print(1, 2, 3, 4 ) 1806 A: print(1, 2, 3, 4 )
@@ -1821,7 +1821,7 @@ static MyDeepFactory g_MyDeepFactory;
1821 1821
1822<p> 1822<p>
1823 <ul> 1823 <ul>
1824 <li>Data passing (parameters, upvalues, <a href="#lindas">Linda</a> messages) is generally fast, doing two binary state-to-state copies (from source state to hidden state, hidden state to target state). Remember that not only the function you specify but also its upvalues, their upvalues, etc. etc. will get copied.</li> 1824 <li>Data passing (arguments, upvalues, <a href="#lindas">Linda</a> messages) is generally fast, doing two binary state-to-state copies (from source state to hidden state, hidden state to target state). Remember that not only the function you specify but also its upvalues, their upvalues, etc. etc. will get copied.</li>
1825 <li>Lane startup is fast (1000's of lanes a second), depending on the number of standard libraries initialized. Initializing all standard libraries is about 3-4 times slower than having no standard libraries at all. If you throw in a lot of lanes per second, make sure you give them minimal necessary set of libraries.</li> 1825 <li>Lane startup is fast (1000's of lanes a second), depending on the number of standard libraries initialized. Initializing all standard libraries is about 3-4 times slower than having no standard libraries at all. If you throw in a lot of lanes per second, make sure you give them minimal necessary set of libraries.</li>
1826 <li>Waiting Lindas are woken up (and execute some hidden Lua code) each time <u>any</u> key in the <a href="#lindas">Lindas</a> they are waiting for are changed. This may give essential slow-down (not measured, just a gut feeling) if a lot of <a href="#lindas">Linda</a> keys are used. Using separate <a href="#lindas">Lindas</a> for logically separate issues will help (which is good practice anyhow).</li> 1826 <li>Waiting Lindas are woken up (and execute some hidden Lua code) each time <u>any</u> key in the <a href="#lindas">Lindas</a> they are waiting for are changed. This may give essential slow-down (not measured, just a gut feeling) if a lot of <a href="#lindas">Linda</a> keys are used. Using separate <a href="#lindas">Lindas</a> for logically separate issues will help (which is good practice anyhow).</li>
1827 <li><a href="#lindas">Linda</a> objects are light. The memory footprint is two OS-level signalling objects (<tt>HANDLE</tt> or <tt>pthread_cond_t</tt>) for each, plus one C pointer for the proxies per each Lua state using the <a href="#lindas">Linda</a>. Barely nothing.</li> 1827 <li><a href="#lindas">Linda</a> objects are light. The memory footprint is two OS-level signalling objects (<tt>HANDLE</tt> or <tt>pthread_cond_t</tt>) for each, plus one C pointer for the proxies per each Lua state using the <a href="#lindas">Linda</a>. Barely nothing.</li>