Thread
thread:pause
Shared
Pauses currently running thread
Syntax
local ctx = thread:pause()Parameters
| Type | Name | Description |
|---|
Returns
| Type | Name | Description |
|---|---|---|
bool | ctx | Returns 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()