public abstract class TaskExecutor extends Object
It holds a collection a executors for each group of task.
TODO: Don't use this from outside, we don't know what the API will look like yet.
| Constructor and Description |
|---|
TaskExecutor() |
| Modifier and Type | Method and Description |
|---|---|
abstract void |
executeOnDiskIO(Runnable runnable)
Executes the given task in the disk IO thread pool.
|
void |
executeOnMainThread(Runnable runnable)
Executes the given task on the main thread.
|
abstract boolean |
isMainThread()
Returns true if the current thread is the main thread, false otherwise.
|
abstract void |
postToMainThread(Runnable runnable)
Posts the given task to the main thread.
|
public abstract void executeOnDiskIO(@NonNull Runnable runnable)
runnable - The runnable to run in the disk IO thread pool.public abstract void postToMainThread(@NonNull Runnable runnable)
runnable - The runnable to run on the main thread.public void executeOnMainThread(@NonNull Runnable runnable)
If the current thread is a main thread, immediately runs the given runnable.
runnable - The runnable to run on the main thread.public abstract boolean isMainThread()
Copyright © 2019. All rights reserved.