M MY Multiplayer: Wiki
Side
Kind

async.status

Shared

Tells what state an async thread of this resource is in.

string async.status(any thread)

Parameters

NameTypeDescription
threadanyA 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)

See also