public class RoundRobinAsynchronousRunner extends java.lang.Object implements AsynchronousRunner, Queuable
| Constructor and Description |
|---|
RoundRobinAsynchronousRunner(int num_threads,
boolean daemon) |
| Modifier and Type | Method and Description |
|---|---|
RunnableQueue |
asRunnableQueue() |
void |
close()
Clean-up resources held by this asynchronous runner
as soon as possible.
|
void |
close(boolean skip_remaining_tasks)
Finish with this AsynchronousRunner, and clean-up
any Threads or resources it may hold.
|
void |
postRunnable(java.lang.Runnable r) |
public RoundRobinAsynchronousRunner(int num_threads,
boolean daemon)
public void postRunnable(java.lang.Runnable r)
postRunnable in interface AsynchronousRunnerpublic RunnableQueue asRunnableQueue()
asRunnableQueue in interface Queuablepublic void close(boolean skip_remaining_tasks)
AsynchronousRunnerclose in interface AsynchronousRunnerskip_remaining_tasks - Should be regarded as
a hint, not a guarantee. If true, pending,
not-yet-performed tasks will be skipped,
if possible.
Currently executing tasks may or
may not be interrupted. If false, all
previously scheduled tasks will be
completed prior to clean-up. The method
returns immediately regardless.public void close()
AsynchronousRunnerclose in interface ClosableResourceclose in interface AsynchronousRunner