isparallel Synchronous

  • checkparallel
  • is_parallel

Report whether the current Luau execution is in a parallel phase. Check it before choosing work that depends on the current scheduler context.

Syntax
Luau
isparallel() -> boolean

Parameters

This function takes no arguments.

Returns

boolean

true during parallel execution; false otherwise.

Example

Example
Luau
if isparallel() then
    print("Running in a parallel phase")
else
    print("Running in a serial phase")
end
Kawaii documentation