diff options
author | Benoit Germain <bnt.germain@gmail.com> | 2012-09-10 20:41:03 +0200 |
---|---|---|
committer | Benoit Germain <bnt.germain@gmail.com> | 2012-09-10 20:41:03 +0200 |
commit | 242feeb342f68999b02c2b8dc4614abefdab8431 (patch) | |
tree | 904a3898035f89e5656036a0e7d454f560eb0455 /src/threading.h | |
parent | e37191ab11102ee784dc88578165074d2d0a2fff (diff) | |
download | lanes-242feeb342f68999b02c2b8dc4614abefdab8431.tar.gz lanes-242feeb342f68999b02c2b8dc4614abefdab8431.tar.bz2 lanes-242feeb342f68999b02c2b8dc4614abefdab8431.zip |
version 3.3.0
* lane.status can return "killed" if lane was forcefully killed with lanes:cancel()
* lane:join(): return nil, "killed" if called on a killed lane.
* lane[<n>]: produces [1] = nil, [2] = "killed" if the lane was killed
* lane:join(): fixed an assertion in debug builds when joining a lane forcefully cancelled with lane:cancel( <x>, true).
* indexing a lane with a string other than "join", "cancel" or "status" raises an error.
* fixed configure() to correctly apply defaults when they are missing from the provided settings
* added a shutdown_timeout to control the duration Lanes will wait for graceful termination of running lanes at application shutdown. Default is 0.25.
Among other things, fixes issue #31.
Diffstat (limited to 'src/threading.h')
-rw-r--r-- | src/threading.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/threading.h b/src/threading.h index b0a3db0..f4f1ada 100644 --- a/src/threading.h +++ b/src/threading.h | |||
@@ -35,6 +35,9 @@ typedef unsigned int uint_t; | |||
35 | #include <time.h> | 35 | #include <time.h> |
36 | 36 | ||
37 | /* Note: ERROR is a defined entity on Win32 | 37 | /* Note: ERROR is a defined entity on Win32 |
38 | PENDING: The Lua VM hasn't done anything yet. | ||
39 | RUNNING, WAITING: Thread is inside the Lua VM. If the thread is forcefully stopped, we can't lua_close() the Lua State. | ||
40 | DONE, ERROR_ST, CANCELLED: Thread execution is outside the Lua VM. It can be lua_close()d. | ||
38 | */ | 41 | */ |
39 | enum e_status { PENDING, RUNNING, WAITING, DONE, ERROR_ST, CANCELLED }; | 42 | enum e_status { PENDING, RUNNING, WAITING, DONE, ERROR_ST, CANCELLED }; |
40 | 43 | ||