Thread:setFunction

From GiderosMobile
Revision as of 13:26, 4 October 2018 by PaulR (talk | contribs) (Created page with "__NOTOC__ <languages /> '''<translate>Available since</translate>:''' 2018.10<br/> '''<translate>Class</translate>:''' Thread<br/> === <translat...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)


Available since: 2018.10
Class: Thread

Description

Sets Lua function that thread will execute. Will return false if the function cannot be set because the thread is currently running or suspended.

local ok = thread:setFunction(func)

Parameters

func: (function) Lua code to run in thread.

Return values

ok: (boolean) success or failure