Difference between revisions of "Thread:resume"

From GiderosMobile
m (Text replacement - "</source>" to "</syntaxhighlight>")
 
(2 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 
__NOTOC__
 
__NOTOC__
<languages />
+
'''Available since:''' 2018.10<br/>
'''<translate>Available since</translate>:''' 2018.10<br/>
+
'''Class:''' [[Thread]]<br/>
'''<translate>Class</translate>:''' [[Special:MyLanguage/Thread|Thread]]<br/>
 
  
=== <translate>Description</translate> ===
+
=== Description ===
<translate>Resumes a thread that has been yielded (only a valid call outside a thread). It returns arguments passed by the
+
Resumes a thread that has been yielded (only a valid call outside a thread).
yield call and arguments supplied to resume are returned by the yield call
+
<syntaxhighlight lang="lua">
to the thread.
+
ok, ... = thread:resume(...)
</translate><br/>
+
</syntaxhighlight>
<source lang="lua">local ok, ... = thread:resume(...)</source>
 
  
=== <translate>Parameters</translate> ===
+
It returns arguments passed by the yield call and arguments supplied to resume are returned by the yield call to the thread.
'''...: ''' ''(misc)'' <translate>arguments that will be returned by yield call that we resumed</translate><br/>
+
 
=== <translate>Return values</translate> ===
+
=== Parameters ===
'''ok: ''' ''(boolean)'' <translate>success</translate><br/>
+
'''...: ''' ''(misc)'' arguments that will be returned by yield call that we resumed<br/>
'''...: ''' ''(misc)'' <translate>arguments provided by yield call</translate><br/>
+
 
 +
=== Return values ===
 +
'''ok: ''' ''(boolean)'' success<br/>
 +
'''...: ''' ''(misc)'' arguments provided by yield call<br/>
  
 
{{Thread}}
 
{{Thread}}

Latest revision as of 14:33, 13 July 2023

Available since: 2018.10
Class: Thread

Description

Resumes a thread that has been yielded (only a valid call outside a thread).

ok, ... = thread:resume(...)

It returns arguments passed by the yield call and arguments supplied to resume are returned by the yield call to the thread.

Parameters

...: (misc) arguments that will be returned by yield call that we resumed

Return values

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