public final class AndroidExecutionService extends AbstractExecutionService
ExecutionService.Cancellable, ExecutionService.CloseableExecutor
Constructor and Description |
---|
AndroidExecutionService() |
AndroidExecutionService(ThreadPoolExecutor executor) |
Modifier and Type | Method and Description |
---|---|
Executor |
getDefaultExecutor()
Get the main executor.
|
ExecutionService.Cancellable |
postDelayedOnExecutor(long delayMs,
Executor executor,
Runnable task)
This runs a task on Android's main thread for just long enough to enough to enqueue the passed task
on the passed executor.
|
cancelDelayedTask, dumpState, dumpThreads, getConcurrentExecutor, getSerialExecutor, throttled
public AndroidExecutionService()
public AndroidExecutionService(@NonNull ThreadPoolExecutor executor)
@NonNull public Executor getDefaultExecutor()
ExecutionService
@NonNull public ExecutionService.Cancellable postDelayedOnExecutor(long delayMs, @NonNull Executor executor, @NonNull Runnable task)
delayMs
- delay before posting the task. There may be additional queue delays in the executor.executor
- an executor on which to execute the task.task
- the task to be executed.