dnsjit.core.thread(3) | Library Functions Manual | dnsjit.core.thread(3) |
dnsjit.core.thread - POSIX thread with separate Lua state
local thr = require("dnsjit.core.thread").new()
thr:start(function(thr)
print("Hello from thread")
print("got:", thr:pop(), " = ", thr:pop(3))
end)
thr:push("value from main", 1, 2, 3)
thr:stop()
Start a new POSIX thread with it's own Lua state. Sharable objects can be passed to the thread by pushing and poping them of the thread stack. The Thread object and any other objects passed to the thread needs to be kept alive as long as the thread is running.
Jerry Lundström (DNS-OARC), Tomáš Křížek (CZ.NIC), Petr Špaček (ISC)
Maintained by DNS-OARC
For issues and feature requests please use:
For question and help please use:
1.2.3 | dnsjit |