Threads
A simple thread manager for lulu. Not complete multithreading support but somewhat useful for non-blocking tasks.
Methods
threads.spawn((fn) -> ThreadHandle): Spawn a new thread with your functionthreads.join(ThreadHandle): Joins threads to the main threadthreads.sleep(number): Sleeps the current thread
using { lulib.threads }
local t = threads.spawn(function()
threads.sleep(10)
print('Done')
end)
threads.join(t)