Threads for LuaJIT. Relies on SDL2 threads for portability. Transparent exchange of data between threads is allowed thanks to torch serialization.