Difference between revisions of "Thread:getResults"

From GiderosMobile
(Created page with "__NOTOC__ <languages /> '''<translate>Available since</translate>:''' 2018.10<br/> '''<translate>Class</translate>:''' Thread<br/> === <translat...")
 
Line 16: Line 16:
 
'''ok: ''' ''(boolean)''  <translate>success</translate><br/>
 
'''ok: ''' ''(boolean)''  <translate>success</translate><br/>
 
'''...: ''' ''(misc)''  <translate>any number of returned variables</translate><br/>
 
'''...: ''' ''(misc)''  <translate>any number of returned variables</translate><br/>
 +
 +
{{Thread}}

Revision as of 22:58, 11 February 2020


Available since: 2018.10
Class: Thread

Description

Get any results from thread if finished now, or after waiting a supplied number of microseconds.
Also throws any runtime errors generated by a thread, call periodically to check.

local ok, ... = thread:getResults(wait_time)

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