Class ConcurrentTaskQueue<R>
java.lang.Object
ch.ladestation.connectncharge.util.mvcbase.ConcurrentTaskQueue<R>
A device where tasks can be submitted for execution.
Execution is asynchronous - possibly in a different thread - but the sequence is kept stable, such that for all tasks A and B: if B is submitted after A, B will only be executed after A is finished.
New tasks can be submitted while tasks are running.
Task submission itself is supposed to be thread-confined, i.e. creation of the ConcurrentTaskQueue and task submission is expected to run in the same thread, most likely the JavaFX UI Application Thread.
- Author:
- Dierk Koenig
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
ConcurrentTaskQueue
public ConcurrentTaskQueue() -
ConcurrentTaskQueue
-
-
Method Details
-
shutdown
public void shutdown() -
submit
-
submit
-