Added UI thread methods to AndroidExecutor.

This commit is contained in:
akwizgran
2016-08-20 17:06:52 +01:00
parent dbdf567d4e
commit 28be7d5de3
10 changed files with 97 additions and 45 deletions

View File

@@ -13,10 +13,21 @@ public interface AndroidExecutor {
* Runs the given task on a background thread with a message queue and
* returns a Future for getting the result.
*/
<V> Future<V> submit(Callable<V> c);
<V> Future<V> runOnBackgroundThread(Callable<V> c);
/**
* Runs the given task on a background thread with a message queue.
*/
void execute(Runnable r);
void runOnBackgroundThread(Runnable r);
/**
* Runs the given task on the main UI thread and returns a Future for
* getting the result.
*/
<V> Future<V> runOnUiThread(Callable<V> c);
/**
* Runs the given task on the main UI thread.
*/
void runOnUiThread(Runnable r);
}