service / com.scurab.android.uitor.tools / Executor

Executor

open class Executor

Types

Action

interface Action<T : Any!>

Constructors

<init>

Executor()

Functions

runInMainThreadBlocking

Run op in main thread with 2s timeout

open static fun <T : Any!> runInMainThreadBlocking(op: Action<T>!): Topen static fun <T : Any!> runInMainThreadBlocking(timeout: Int, op: Action<T>!): T

Run code in main thread and block current running thread

open static fun <T : Any!> runInMainThreadBlocking(handler: Handler!, op: Action<T>!, timeout: Int): T

runInMainThreadBlockingOnlyIfCrashing

Run op in main thread with 2s timeout only if it's crashing... First try is started in current thread

open static fun <T : Any!> runInMainThreadBlockingOnlyIfCrashing(op: Action<T>!): T