Vital.sandbox
Thread

thread:pause

Shared

Pauses currently running thread


Syntax

local ctx = thread:pause()

Parameters

TypeNameDescription

Returns

TypeNameDescription
boolctxtrue on successful execution, or false on failure

Examples

Pause a thread then resume it manually
local self = thread:create(function(self)
    engine.print("info", "Paused thread")
    thread:pause()
    engine.print("info", "Hello from thread")
end)

self:resume()

On this page