Threading
Index
Interfaces
Variables
Functions
Interfaces
ErrorMessageFormatFunction
Parameters
error: any
java.lang.Throwable instance or javascript exception
priority: number
current thread priority
Returns string
Variables
constthreadsinternal
Running threads, use Threading.getThread to directly access required thread by name.
Type declaration
[name string]: java.lang.Thread
Functions
formatFatalErrorMessage
- internal
Function used to create formatted error message with the full debug information about exception in one of the threads.
Parameters
error: any
java.lang.Throwable instance or javascript exception
name: string
thread name used to localize errors if there are any
priority: number
current thread priority
formatFunc: ErrorMessageFormatFunction
function that formats the exception itself
Returns string
getThread
Gets thread by it's name.
Parameters
name: string
name of the thread
Returns Nullable<java.lang.Thread>
Instance representing the thread.
initThread
Creates and runs new thread with specified function as a task.
Parameters
name: string
thread name used to localize errors if there are any
func: () => void
function that runs in the new thread. Usually it is some time-consuming task, that is executed in the new thread to avoid blocking user interfaces
optionalpriority: number
priority of the thread (integer value). The higher priority is, the quicker the task will be executed. Default value is 0
optionalisErrorFatal: boolean
if
true
, all errors in the thread are considered fatal and lead to fatal error AlertDialog, formatted with formatFuncoptionalformatFunc: ErrorMessageFormatFunction
function that formats exceptions in the thread to display in fatal error AlertDialog
Returns java.lang.Thread
Instance representing created thread.
Module used to create and manipulate threads. Threads let you execute time-consuming tasks without blocking current execution thread.