launch

fun <T> launch(executor: Executor, block: Supplier<T>): Value

Starts an async task on executor, returns a Promise. JS Promise result will be resolved or rejected on Render thread. You can use utils from java.util.concurrent to control your tasks.

Return

Promise<T>


fun <T> launch(block: Supplier<T>): Value

Starts an async task on Util.getMainWorkerExecutor(), returns a Promise. JS Promise result will be resolved or rejected on Render thread. You can use utils from java.util.concurrent to control your tasks.

Return

Promise<T>