Syntax
isparallel(): booleanAliases
checkparallelReturns
| Name | Type | Description |
|---|---|---|
parallel | boolean | true when the current execution context is parallel; false when the flag is not set or the status cannot be resolved. |
Description
Returns a boolean from the current Luau thread's ScriptContext DataModel. The function takes no arguments. It reads the current current parallel execution status. If the current DataModel returns no DataModel, the function returns false. checkparallel is an alias for the same function.
Call it without parameters. The function reads the needed context from the current runtime state.
It returns parallel (boolean). Use the returns table to separate successful values from nil results and recoverable errors.
Example
Read whether the current DataModel is in the parallel phase.
local parallel = isparallel()
print(parallel)
print(checkparallel())