Checks whether the current thread is running in parallel.
Roblox runs most code on one serial thread. Code inside an Actor that has called task.desynchronize() runs in parallel instead - it is desynchronized. task.synchronize() brings that thread back to serial. is_parallel() reports which side the thread that calls it is on right now.
A parallel thread can read values from the game, but it cannot change some of them. Call is_parallel() before a write and run task.synchronize() first if it returns true.
- Parallel Luau - Roblox multithreading concepts: Actors, desynchronize, synchronize.
Returns
boolean - true if the calling thread is currently parallel, false if it is serial.
Aliases
Example
Always check parameters and return values when working with this library function.