summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenoit Germain <b n t DOT g e r m a i n AT g m a i l DOT c o m>2013-11-29 20:33:46 +0100
committerBenoit Germain <b n t DOT g e r m a i n AT g m a i l DOT c o m>2013-11-29 20:33:46 +0100
commit0ea511c4d8f82363d081e38524beaa4b9a24cf9a (patch)
tree63b7f2e09741c0e19dfea5710b17f71208bda0e6
parent28c401f59ac8238cf4f273c64f0366f10517a67c (diff)
downloadlanes-0ea511c4d8f82363d081e38524beaa4b9a24cf9a.tar.gz
lanes-0ea511c4d8f82363d081e38524beaa4b9a24cf9a.tar.bz2
lanes-0ea511c4d8f82363d081e38524beaa4b9a24cf9a.zip
supposedly improved pthread support
* bumped version to 3.7.3 * set pthread thread cancel type to PTHREAD_CANCEL_ASYNCHRONOUS * lane_h:cancel() accepts a 3rd timeout argument used when waiting for actual thread termination (hitting the timeout raises an error) * added PROPAGATE_ALLOCF macro to select state creation mode (lua_newstate or luaL_newstate)
-rw-r--r--index.html18
1 files changed, 10 insertions, 8 deletions
diff --git a/index.html b/index.html
index 40930d8..25f9e22 100644
--- a/index.html
+++ b/index.html
@@ -70,7 +70,7 @@
70 </p> 70 </p>
71 71
72 <p> 72 <p>
73 This document was revised on 16-Nov-13, and applies to version <tt>3.7.2</tt>. 73 This document was revised on 28-Nov-13, and applies to version <tt>3.7.3</tt>.
74 </p> 74 </p>
75 </font> 75 </font>
76 </center> 76 </center>
@@ -102,7 +102,7 @@
102 <li>Data passing uses fast inter-state copies (no serialization required).</li> 102 <li>Data passing uses fast inter-state copies (no serialization required).</li>
103 <li>"Deep userdata" concept, for sharing userdata over multiple lanes.</li> 103 <li>"Deep userdata" concept, for sharing userdata over multiple lanes.</li>
104 <li>Millisecond level timers, integrated with the Linda system.</li> 104 <li>Millisecond level timers, integrated with the Linda system.</li>
105 <li>Threads can be given priorities -2..+2 (default is 0).</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 </ul> 108 </ul>
@@ -587,9 +587,10 @@
587 <td> 587 <td>
588 <code>.priority</code> 588 <code>.priority</code>
589 </td> 589 </td>
590 <td> integer -2..+2</td> 590 <td>integer</td>
591 <td> 591 <td>
592 The priority of lanes generated. -2 is lowest, +2 is highest. 592 The priority of lanes generated in the range -3..+3 (MinGW pthread and Windows thread API), or -2..+2 otherwise (default is 0).
593 These values are a mapping over the actual priority range of the underlying implementation.
593 <br> 594 <br>
594 Implementation and dependability of priorities varies by platform. Especially Linux kernel 2.6 is not supporting priorities in user mode. 595 Implementation and dependability of priorities varies by platform. Especially Linux kernel 2.6 is not supporting priorities in user mode.
595 </td> 596 </td>
@@ -842,14 +843,15 @@
842<h2 id="cancelling">Cancelling</h2> 843<h2 id="cancelling">Cancelling</h2>
843 844
844<table border="1" bgcolor="#E0E0FF" cellpadding="10" style="width:50%"><tr><td><pre> 845<table border="1" bgcolor="#E0E0FF" cellpadding="10" style="width:50%"><tr><td><pre>
845 bool[,reason] = lane_h:cancel( [timeout_secs=0.0,] [force_kill_bool = false] ) 846 bool[,reason] = lane_h:cancel( [timeout_secs=0.0,] [force_kill_bool = false] [, forcekill_timeout=0.0])
846</pre></td></tr></table> 847</pre></td></tr></table>
847 848
848<p> 849<p>
849 <tt>cancel()</tt>sends a cancellation request to the lane.<br/> 850 <tt>cancel()</tt> sends a cancellation request to the lane.<br/>
851 If <tt>timeout_secs</tt> is negative (aka "soft cancel"), starting with version 3.6.3, will only cause <tt>cancel_test()</tt> to return <tt>true</tt>, so that the lane can cleanup manually (the actual value is irrelevant). You can't provide the additional arguments in that case.<br/>
850 If <tt>timeout_secs</tt> is positive (aka "hard cancel"), waits for the request to be processed, or a timeout to occur.<br/> 852 If <tt>timeout_secs</tt> is positive (aka "hard cancel"), waits for the request to be processed, or a timeout to occur.<br/>
851 If <tt>timeout_secs</tt> is negative (aka "soft cancel"), starting with version 3.6.3, will only cause <tt>cancel_test()</tt> to return true, so that the lane can cleanup manually. You can't provide a second argument in that case.<br/> 853 If <tt>force_kill_bool</tt> is <tt>true</tt>, <tt>forcekill_timeout</tt> can be set to tell how long lanes will wait for the OS thread to terminate before raising an error. Windows threads always terminate immediately, but it might not always be the case with some pthread implementations.
852 Returns <tt>true</tt> if soft cancelling, or the lane was already done (in <tt>"done"</tt>, <tt>"error"</tt> or <tt>"cancelled"</tt> status), or the cancellation was fruitful within timeout period. 854 Returns <tt>true</tt> if soft cancelling, or the lane was already done (in <tt>"done"</tt>, <tt>"error"</tt> or <tt>"cancelled"</tt> status), or the cancellation was fruitful within <tt>timeout_secs</tt> timeout period.
853</p> 855</p>
854 856
855<p> 857<p>