Difference between revisions of "Thread:setFunction"

From GiderosMobile
(Created page with "__NOTOC__ <languages /> '''<translate>Available since</translate>:''' 2018.10<br/> '''<translate>Class</translate>:''' Thread<br/> === <translat...")
 
Line 14: Line 14:
 
=== <translate>Return values</translate> ===
 
=== <translate>Return values</translate> ===
 
'''ok: ''' ''(boolean)''  <translate>success or failure</translate><br/>
 
'''ok: ''' ''(boolean)''  <translate>success or failure</translate><br/>
 +
 +
{{Thread}}

Revision as of 22:59, 11 February 2020


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