Difference between revisions of "Thread:getResults"

From GiderosMobile
m (Text replacement - "<source" to "<syntaxhighlight")
Line 5: Line 5:
 
=== Description ===
 
=== Description ===
 
Gets any results from thread if finished now, or after waiting a supplied number of microseconds.
 
Gets any results from thread if finished now, or after waiting a supplied number of microseconds.
<source lang="lua">
+
<syntaxhighlight lang="lua">
 
ok, ... = thread:getResults(wait_time)
 
ok, ... = thread:getResults(wait_time)
 
</source>
 
</source>

Revision as of 14:31, 13 July 2023

Available since: 2018.10
Class: Thread

Description

Gets any results from thread if finished now, or after waiting a supplied number of microseconds. <syntaxhighlight lang="lua"> ok, ... = thread:getResults(wait_time) </source>

Also throws any runtime errors generated by a thread, call periodically to check.

Parameters

wait_time: (number) time in microseconds to wait for result if none available

Return values

ok: (boolean) success
...: (misc) any number of returned variables