tock / ai.tock.shared / Executor / executeBlocking

executeBlocking

abstract fun executeBlocking(delay: Duration, runnable: () -> Unit): Unit (source)

Execute a task to another thread.

Parameters

runnable - the task to run

Delay
delay the delay before run

abstract fun executeBlocking(runnable: () -> Unit): Unit (source)

Execute a task to another thread.

Parameters

runnable - the task to run

abstract fun <T> executeBlocking(blocking: Callable<T>, result: (T?) -> Unit): Unit (source)

Execute a task to another thread. If an exception is thrown by the blocking function, null is passed to the result function.

Parameters

blocking - the task to run

result - the result handler