diff options
Diffstat (limited to 'src/lua')
-rw-r--r-- | src/lua/llthreads2/ex.lua | 9 |
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() |
142 | end | 142 | end |
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. | ||
149 | function thread_mt:interrupt(arg) | ||
150 | return self.thread:interrupt(arg) | ||
151 | end | ||
152 | |||
144 | end | 153 | end |
145 | ------------------------------------------------------------------------------- | 154 | ------------------------------------------------------------------------------- |
146 | 155 | ||