Difference between revisions of "Coroutine.status"

From GiderosMobile
m (Text replacement - "</source>" to "</syntaxhighlight>")
 
(4 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 
__NOTOC__
 
__NOTOC__
'''<translate>Available since</translate>:''' Gideros 2011.6<br/>
+
'''Available since:''' Gideros 2011.6<br/>
'''<translate>Class</translate>:''' [[Special:MyLanguage/coroutine|coroutine]]<br/>
+
'''Class:''' [[coroutine]]<br/>
=== <translate>Description</translate> ===
+
 
<translate>Returns the status of [[Special:MyLanguage/coroutine|coroutine]] co, as a string: "running", if the coroutine is running (that is, it called status); "suspended", if the coroutine is suspended in a call to yield, or if it has not started running yet; "normal" if the coroutine is active but not running (that is, it has resumed another coroutine); and "dead" if the coroutine has finished its body function, or if it has stopped with an error.</translate>
+
=== Description ===
<source lang="lua">
+
Returns the status of coroutine co as a string.
 +
<syntaxhighlight lang="lua">
 
(string) = coroutine.status(co)
 
(string) = coroutine.status(co)
</source>
+
</syntaxhighlight>
=== <translate>Parameters</translate> ===
+
 
'''co''': (coroutine) <translate>coroutine to check status for</translate> <br/>
+
''''running', if the coroutine is running (that is, it called status); 'suspended', if the coroutine is suspended in a call to yield, or if it has not started running yet; 'normal' if the coroutine is active but not running (that is, it has resumed another coroutine); and 'dead' if the coroutine has finished its body function, or if it has stopped with an error'''
=== <translate>Return values</translate> ===
+
 
'''<translate>Returns</translate>''' (string) <translate>the state of coroutine</translate><br/>
+
=== Parameters ===
 +
'''co''': (thread) coroutine to check status for<br/>
 +
 
 +
=== Return values ===
 +
'''Returns''' (string) the state of coroutine<br/>
 +
 
 +
{{Coroutine}}

Latest revision as of 14:27, 13 July 2023

Available since: Gideros 2011.6
Class: coroutine

Description

Returns the status of coroutine co as a string.

(string) = coroutine.status(co)
'running', if the coroutine is running (that is, it called status); 'suspended', if the coroutine is suspended in a call to yield, or if it has not started running yet; 'normal' if the coroutine is active but not running (that is, it has resumed another coroutine); and 'dead' if the coroutine has finished its body function, or if it has stopped with an error

Parameters

co: (thread) coroutine to check status for

Return values

Returns (string) the state of coroutine