ThreadMethods
self:destroy
Shared
Destroys an existing thread
Syntax
local status = self:destroy()Parameters
| Type | Name | Description |
|---|
Returns
| Type | Name | Description |
|---|---|---|
bool | status | Returns 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()