Vital.sandbox
Thread

thread:pause

Shared

Pauses currently running thread


Syntax

local ctx = thread:pause()

Parameters

TypeNameDescription

Returns

TypeNameDescription
boolctxReturns true on successful execution, or false on failure

Examples

local self = thread:create(function(self)
    engine.print("Paused thread")
    thread:pause()
    engine.print("Hello from thread")
end)

self:resume()

On this page