From e97adefde985e30fe31ffa036c74ffb0ce10ca26 Mon Sep 17 00:00:00 2001
From: Benoit Germain This document was revised on 21-Feb-11, and applies to version 2.1.0.
+ This document was revised on 1-Mar-11, and applies to version 2.1.0.
+
+ Each lane also gets a function set_debug_threadname() that it can use anytime to do as the name says.
+Supported debuggers are Microsoft Visual Studio (for the C side) and Decoda (for the Lua side).
Sends a cancellation request to the lane. If timeout_secs is non-zero, waits
+ cancel()sends a cancellation request to the lane. If timeout_secs is non-zero, waits
for the request to be processed, or a timeout to occur.
Returns true if the lane was already done (in "done", "error" or "cancelled" status)
or if the cancellation was fruitful within timeout period.
@@ -387,8 +394,9 @@ OS thread running the lane is forcefully killed. This means no GC, and should
generally be the last resort.
Cancellation is tested before going to sleep in receive() or send() calls
-and after executing cancelstep Lua statements. A currently pending receive
-or send call is currently not awakened, and may be a reason for a non-detected cancel.
+and after executing cancelstep Lua statements. A currently pending receive()
+or send() call is currently not awakened, and may be a reason for a non-detected cancel.
+It is also possible to manually test for cancel requests with cancel_test().
Copyright © 2007-11 Asko Kauppi. All rights reserved.
Lua Lanes is published under the same MIT license as Lua 5.1.
-
@@ -250,20 +251,21 @@ also in the new lanes.
Sets the globals table for the launched threads. This can be used for giving
them constants.
-
The global values of different lanes are in no manner connected;
- 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.
+ modifying one will only affect the particular lane.
-
+
.priority
The priority of lanes generated. -2 is lowest, +2 is highest.
-
Implementation and dependability of priorities varies
by platform. Especially Linux kernel 2.6 is not supporting priorities in user mode.
Free running lanes
@@ -374,10 +376,15 @@ that id over a Linda once that thread is done (as the last thing you do).
Cancelling
-
- bool= lane_h:cancel( [timeout_secs=0.0,] [force_kill_bool=false] )
+ bool= lane_h:cancel( [timeout_secs=0.0,] [force_kill_bool=false] )
+
+
+
+ bool= cancel_test()
+