public Executor
Manage async tasks.
| Modifier and Type | Interface and Description |
|---|---|
static class |
Executor.DefaultImpls
Manage async tasks.
|
| Modifier and Type | Method and Description |
|---|---|
void |
executeBlocking(java.time.Duration delay,
kotlin.jvm.functions.Function0<kotlin.Unit> runnable)
Execute a task to another thread.
|
void |
executeBlocking(kotlin.jvm.functions.Function0<kotlin.Unit> runnable)
Execute a task to another thread.
|
<T> void |
executeBlocking(java.util.concurrent.Callable<T> blocking,
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.
|
long |
setPeriodic(java.time.Duration delay,
kotlin.jvm.functions.Function0<kotlin.Unit> runnable)
Execute a periodic task.
|
long |
setPeriodic(java.time.Duration initialDelay,
java.time.Duration delay,
kotlin.jvm.functions.Function0<kotlin.Unit> runnable)
Execute a periodic task.
|
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.
long 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