Volt

isparallel

Checks if the current thread is running in parallel.

Syntax

isparallel() -> boolean

Aliases

  • is_parallel

Returns

TypeDescription
booleanTrue if running in a parallel context

Description

isparallel returns whether the current code is executing in a parallel Luau context (inside an Actor).

Example

if isparallel() then
    print("Running in parallel!")
    -- Safe to do parallel-safe operations
else
    print("Running on main thread")
end

Use in Actor

run_on_actor(someActor, [[
    print("Is parallel:", isparallel()) -- true
]])

print("Is parallel:", isparallel()) -- false (main thread)

Notes

  • Returns false on the main game thread
  • Returns true when running inside an actor via run_on_actor

On this page