public final class SerialExecutor implements AutoCloseable, ExecutorAn executor that runs tasks sequentially.
Constructors
SerialExecutor(Executor executor)
public SerialExecutor(Executor executor)| Parameter | |
|---|---|
| Name | Description |
executor |
Executor |
Methods
close()
public void close()Shuts down the executor. No subsequent tasks will run, but any running task will be left to complete.
execute(Runnable r)
public void execute(Runnable r)| Parameter | |
|---|---|
| Name | Description |
r |
Runnable |
waitUntilInactive()
public void waitUntilInactive()Waits until there are no active tasks.