Vital.sandbox
ThreadMethods

self:destroy

Shared

Destroys an existing thread


Syntax

local status = self:destroy()

Parameters

TypeNameDescription

Returns

TypeNameDescription
boolstatusReturns true on successful execution, or false on failure

Examples

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

self:resume()
self:destroy()

On this page