Difference between revisions of "Thread:getResults"
From GiderosMobile
Line 1: | Line 1: | ||
__NOTOC__ | __NOTOC__ | ||
− | + | '''Available since:''' 2018.10<br/> | |
− | ''' | + | '''Class:''' [[Thread]]<br/> |
− | ''' | + | |
+ | === Description === | ||
+ | Gets any results from thread if finished now, or after waiting a supplied number of microseconds. | ||
+ | <source lang="lua"> | ||
+ | ok, ... = thread:getResults(wait_time) | ||
+ | </source> | ||
− | |||
− | |||
− | |||
Also throws any runtime errors generated by a thread, call periodically to check. | Also throws any runtime errors generated by a thread, call periodically to check. | ||
− | |||
− | |||
− | === | + | === Parameters === |
− | '''wait_time: ''' ''(number)'' | + | '''wait_time: ''' ''(number)'' time in microseconds to wait for result if none available<br/> |
− | === | + | |
− | '''ok: ''' ''(boolean)'' | + | === Return values === |
− | '''...: ''' ''(misc)'' | + | '''ok: ''' ''(boolean)'' success<br/> |
+ | '''...: ''' ''(misc)'' any number of returned variables<br/> | ||
{{Thread}} | {{Thread}} |
Revision as of 04:44, 11 June 2023
Available since: 2018.10
Class: Thread
Description
Gets any results from thread if finished now, or after waiting a supplied number of microseconds.
ok, ... = thread:getResults(wait_time)
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