New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
new method thread:interrupt() #16
Conversation
|
This is not valid access to LuaState from different thread while it executes insepareate thread |
|
But |
|
Did not know that. Thanks. local llthreads = require"llthreads"
local utils = require "utils"
local sleep = utils.sleep
local include = utils.thread_init .. [[
local llthreads = require"llthreads"
local sleep = require "utils".sleep
]]
local thread = llthreads.new(include .. [[
for i = 1, 10 do sleep(1) end
os.exit(-1)
]])
thread:start()
sleep(1)
thread:interrupt()
local ok, err = thread:join()
print("thread:join(): ", ok, err)
assert(ok, err)
print("Done!") |
|
OK, I will look into the test cases tomorrow. |
|
OK, I added the test cases and they ran successfully on travis and appveyor. |
|
Sorry for late response. |
…x and is also available in the public api
|
No problems, I just committed some changes trying to incorporate your wishes: the interrupeted message contains no exclamation mark (btw. the message |
Hi,
here comes a method to interrupt a thread using a debug hook similiar to the SIGINT signal handler of the original lua interpreter (see function laction in lua.c).
Best regards,
Oliver