Thread:setFunction

From GiderosMobile
Revision as of 14:33, 13 July 2023 by Hgy29 (talk | contribs) (Text replacement - "</source>" to "</syntaxhighlight>")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Available since: 2018.10
Class: Thread

Description

Sets a Lua function that thread will execute.

ok = thread:setFunction(func)

Will return false if the function cannot be set because the thread is currently running or suspended.

Parameters

func: (function) Lua code to run in thread

Return values

ok: (boolean) success