diff options
author | Benoit Germain <bnt period germain arrobase gmail period com> | 2014-01-16 14:17:23 +0100 |
---|---|---|
committer | Benoit Germain <bnt period germain arrobase gmail period com> | 2014-01-16 14:17:23 +0100 |
commit | 1843a0add00186eee129b0b0a2ee605866acbb61 (patch) | |
tree | 5de8d13e1b8495836f898c17790adf571f05365c /src/lanes.lua | |
parent | baaea3cebf9d787f76557b68f18a012dc6adbbbc (diff) | |
download | lanes-1843a0add00186eee129b0b0a2ee605866acbb61.tar.gz lanes-1843a0add00186eee129b0b0a2ee605866acbb61.tar.bz2 lanes-1843a0add00186eee129b0b0a2ee605866acbb61.zip |
Cancellation improvements and some fixes
* bumped version to 3.7.8
* lane:cancel() now accepts a boolean second argument when soft
cancelling (negative timeout) to wake the thread if necessary
* if a blocked linda send() or receive() call is interrupted by a
cancellation request, it returns CANCEL_ERROR so that this case can be
differentiated from a simple timeout
* fixed WIN32 THREAD_CREATE() wrong _beginthreadex() error detection
* fatal WIN32 threading errors retrieve and output the error description
string with FormatMessage()
* fixed missing lanes.set_singlethreaded
* fixed perftest.lua
* added test/cancel.lua
Diffstat (limited to 'src/lanes.lua')
-rw-r--r-- | src/lanes.lua | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lanes.lua b/src/lanes.lua index 0c544bb..e7b9715 100644 --- a/src/lanes.lua +++ b/src/lanes.lua | |||
@@ -128,7 +128,6 @@ lanes.configure = function( settings_) | |||
128 | end | 128 | end |
129 | local settings = core.configure and core.configure( params_checker( settings_)) or core.settings | 129 | local settings = core.configure and core.configure( params_checker( settings_)) or core.settings |
130 | local thread_new = assert( core.thread_new) | 130 | local thread_new = assert( core.thread_new) |
131 | local set_singlethreaded = assert( core.set_singlethreaded) | ||
132 | local max_prio = assert( core.max_prio) | 131 | local max_prio = assert( core.max_prio) |
133 | 132 | ||
134 | lanes.ABOUT = | 133 | lanes.ABOUT = |
@@ -664,6 +663,7 @@ end | |||
664 | lanes.linda = core.linda | 663 | lanes.linda = core.linda |
665 | lanes.cancel_error = core.cancel_error | 664 | lanes.cancel_error = core.cancel_error |
666 | lanes.nameof = core.nameof | 665 | lanes.nameof = core.nameof |
666 | lanes.set_singlethreaded = core.set_singlethreaded | ||
667 | lanes.threads = core.threads or function() error "lane tracking is not available" end -- core.threads isn't registered if settings.track_lanes is false | 667 | lanes.threads = core.threads or function() error "lane tracking is not available" end -- core.threads isn't registered if settings.track_lanes is false |
668 | lanes.set_thread_priority = core.set_thread_priority | 668 | lanes.set_thread_priority = core.set_thread_priority |
669 | lanes.timer = timer | 669 | lanes.timer = timer |