Closed subnetmarco closed 9 years ago
You can just pass arguments to constructor. Each thread has its own lua_State and you can not use common globals or upvalues.
local function start_thread(message)
local thread = Threads.new(function(message)
print(message)
end, message):start()
end
start_thread("Hello World")
Thank you
How can I pass an argument to a thread? For example: