Atomic docs

isparallel

isparallel(): boolean

Whether the calling thread is running in parallel, read from the actor itself rather than inferred from intercepted task calls. Returns false outside an actor, and false rather than erroring when the actor cannot be read. Nothing in task is replaced to make this work. Aliased as checkparallel.

Example

lua
if isparallel() then
    task.synchronize()
end
↑