ServersYour serverFor creatorsForumFAQDocumentationSecurity
Download the launcher
  1. Documentation
  2. Shared functions
  3. isTask

Function

isTask

Server and clientTimersTrilogy Hub only

Checks whether a value is a task returned by async.

Syntax

bool isTask(var value)

Arguments

valuevar
Any value.

Returns

true for a task.

Example

local task = async(function() sleep(100) end)
print(isTask(task), isTask({}))  -- true  false

See also