public Executor
Manage async tasks.
void executeBlocking(@NotNull
java.time.Duration delay,
@NotNull
kotlin.jvm.functions.Function0<kotlin.Unit> runnable)
Execute a task to another thread.
runnable - the task to runvoid executeBlocking(@NotNull
kotlin.jvm.functions.Function0<kotlin.Unit> runnable)
Execute a task to another thread.
runnable - the task to run<T> void executeBlocking(@NotNull
java.util.concurrent.Callable<T> blocking,
@NotNull
kotlin.jvm.functions.Function1<? super T,kotlin.Unit> result)
Execute a task to another thread. If an exception is thrown by the blocking function, null is passed to the result function.
blocking - the task to runresult - the result handlerlong setPeriodic(@NotNull
java.time.Duration delay,
@NotNull
kotlin.jvm.functions.Function0<kotlin.Unit> runnable)
Execute a periodic task.
delay - the delay between each other callrunnable - the task to runlong setPeriodic(@NotNull
java.time.Duration initialDelay,
@NotNull
java.time.Duration delay,
@NotNull
kotlin.jvm.functions.Function0<kotlin.Unit> runnable)
Execute a periodic task.
initialDelay - the delay before first calldelay - the delay between each other callrunnable - the task to run