async.status
Shared
Tells what state an async thread of this resource is in.
string async.status(any thread)
Parameters
| Name | Type | Description |
|---|---|---|
| thread | any | A thread from async.thread or async.mutex. |
Returns
"suspended" if it is paused, "running" if it is running, "dead" if it ended, was cancelled or is not an async thread of this resource.
Example
local loader = async.thread(function()
async.wait(5000)
end)
setTimer(function()
outputDebugString("loader is " .. async.status(loader))
end, 1000, 1)