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...") |
m (Text replacement - "</source>" to "</syntaxhighlight>") |
||
| (3 intermediate revisions by 2 users not shown) | |||
| Line 1: | Line 1: | ||
__NOTOC__ | __NOTOC__ | ||
| − | + | '''Available since:''' 2018.10<br/> | |
| − | ''' | + | '''Class:''' [[Thread]]<br/> |
| − | ''' | ||
| − | === | + | === Description === |
| − | + | Pauses executions of thread (only a valid call inside thread function). Supplied arguments can be retreived by a subsequent call to resume. | |
| − | can be retreived by a subsequent call to resume. | + | <syntaxhighlight lang="lua"> |
| − | < | + | local ok, ... = Thread.yield(...) |
| − | + | </syntaxhighlight> | |
| − | === | + | === Parameters === |
| − | '''...: ''' ''(misc)'' | + | '''...: ''' ''(misc)'' arguments for next resume call to collect as return values<br/> |
| − | === | + | |
| − | '''ok: ''' ''(boolean)'' | + | === Return values === |
| − | '''...: ''' ''(misc)'' | + | '''ok: ''' ''(boolean)'' success<br/> |
| + | '''...: ''' ''(misc)'' arguments provided by resume call<br/> | ||
| + | |||
| + | {{Thread}} | ||
Latest revision as of 14:33, 13 July 2023
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