threadsThreads

triangle-exclamation

startThread(function)

Start thread

Parameters:

  • function (function).

Return:

  • number

Example Usage:

-- Example code showing how to use the function
local threadId = threads.startThread(function()
        local notification_command = 'snoretoast -t "' .. title .. '" -m "' .. message .. '"'
        os.execute(notification_command)
end)

sleep(delay)

Sleep in thread

Parameters:

  • function (function).

Example Usage:

Last updated