Difference between revisions of "Thread.yield"

From GiderosMobile
(Created page with "__NOTOC__ <languages /> '''<translate>Available since</translate>:''' 2018.10<br/> '''<translate>Class</translate>:''' Thread<br/> === <translat...")
 
Line 15: Line 15:
 
'''ok: ''' ''(boolean)''  <translate>success</translate><br/>
 
'''ok: ''' ''(boolean)''  <translate>success</translate><br/>
 
'''...: ''' ''(misc)''  <translate>arguments provided by resume call</translate><br/>
 
'''...: ''' ''(misc)''  <translate>arguments provided by resume call</translate><br/>
 +
 +
{{Thread}}

Revision as of 22:58, 11 February 2020


Available since: 2018.10
Class: Thread

Description

Pauses executions of thread (only a valid call inside thread function). Supplied arguments can be retreived by a subsequent call to resume.

local ok, ... = Thread.yield(...)

Parameters

...: (misc) arguments for next resume call to collect as return values

Return values

ok: (boolean) success
...: (misc) arguments provided by resume call