Package aQute.lib.concurrent.serial
Class SerialExecutor
java.lang.Object
aQute.lib.concurrent.serial.SerialExecutor
- All Implemented Interfaces:
AutoCloseable
Will execute a set of tasks in order of submit.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
logger
static final org.slf4j.Logger logger -
executor
-
tasks
-
factory
final org.osgi.util.promise.PromiseFactory factory -
thread
-
-
Constructor Details
-
SerialExecutor
The executor to use.- Parameters:
executor
-
-
-
Method Details
-
submit
Run serial in order of submission and return a promise- Type Parameters:
T
- the return type- Parameters:
callable
- the callable providing the data- Returns:
- the promise
-
run
Run the runnable in order of submission.- Parameters:
runnable
- the runnable
-
close
public void close()- Specified by:
close
in interfaceAutoCloseable
-