Difference between revisions of "Thread:resume"
From GiderosMobile
m (Text replacement - "</source>" to "</syntaxhighlight>") |
|||
(One intermediate revision by the same user not shown) | |||
Line 5: | Line 5: | ||
=== Description === | === Description === | ||
Resumes a thread that has been yielded (only a valid call outside a thread). | Resumes a thread that has been yielded (only a valid call outside a thread). | ||
− | < | + | <syntaxhighlight lang="lua"> |
ok, ... = thread:resume(...) | ok, ... = thread:resume(...) | ||
− | </ | + | </syntaxhighlight> |
It returns arguments passed by the yield call and arguments supplied to resume are returned by the yield call to the thread. | It returns arguments passed by the yield call and arguments supplied to resume are returned by the yield call to the 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