Class SerialExecutor (1.7.0)

Stay organized with collections Save and categorize content based on your preferences.
public final class SerialExecutor implements AutoCloseable, Executor

An executor that runs tasks sequentially.

Inheritance

java.lang.Object > SerialExecutor

Implements

AutoCloseable, Executor

Constructors

SerialExecutor(Executor executor)

public SerialExecutor(Executor executor)
Parameter
NameDescription
executorExecutor

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
NameDescription
rRunnable

waitUntilInactive()

public void waitUntilInactive()

Waits until there are no active tasks.