aboutsummaryrefslogtreecommitdiff
path: root/src/lua/llthreads2
diff options
context:
space:
mode:
authorAlexey Melnichuk <alexeymelnichuck@gmail.com>2018-08-27 20:24:22 +0300
committerGitHub <noreply@github.com>2018-08-27 20:24:22 +0300
commit00ca97711b657c7d395d91212364a82dac1d4625 (patch)
tree07d166e87c2f294a0864501756e48d3c313309bb /src/lua/llthreads2
parente33999a890c8bfdb0c1f753820e4261dabb67faa (diff)
parentcd91518d79388d5d42820a2b48918a7bf1e6d1a2 (diff)
downloadlua-llthreads2-00ca97711b657c7d395d91212364a82dac1d4625.tar.gz
lua-llthreads2-00ca97711b657c7d395d91212364a82dac1d4625.tar.bz2
lua-llthreads2-00ca97711b657c7d395d91212364a82dac1d4625.zip
Merge pull request #16 from osch/master
new method thread:interrupt()
Diffstat (limited to 'src/lua/llthreads2')
-rw-r--r--src/lua/llthreads2/ex.lua9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/lua/llthreads2/ex.lua b/src/lua/llthreads2/ex.lua
index f0c27d9..b943f5b 100644
--- a/src/lua/llthreads2/ex.lua
+++ b/src/lua/llthreads2/ex.lua
@@ -141,6 +141,15 @@ function thread_mt:joinable()
141 return self.thread:joinable() 141 return self.thread:joinable()
142end 142end
143 143
144--- Interrupt thread
145-- The thread is interrupted by installing a debug hook that
146-- creates an error.
147-- @tparam ?boolean if not given, interrupt only once,
148-- otherwise this arg sets or unsets permanent interrupt.
149function thread_mt:interrupt(arg)
150 return self.thread:interrupt(arg)
151end
152
144end 153end
145------------------------------------------------------------------------------- 154-------------------------------------------------------------------------------
146 155