Class PausedExecutorService

java.lang.Object
java.util.concurrent.AbstractExecutorService
org.robolectric.android.util.concurrent.PausedExecutorService
All Implemented Interfaces:
Executor, ExecutorService

@Beta
public class PausedExecutorService
extends AbstractExecutorService
Executor service that queues any posted tasks. Users must explicitly call runAll() to execute all pending tasks. Intended to be a replacement for RoboExecutorService when using LooperMode.Mode.PAUSED. Unlike RoboExecutorService, will execute tasks on a background thread. This is useful to test Android code that enforces it runs off the main thread. NOTE: Beta API, subject to change.