public class AsyncExecutor
extends java.lang.Object
implements com.badlogic.gdx.utils.Disposable
| Constructor and Description |
|---|
AsyncExecutor(int maxConcurrent,
org.oscim.utils.async.TaskQueue mainloop)
Creates a new AsynchExecutor that allows maxConcurrent
Runnable
instances to run in parallel. |
| Modifier and Type | Method and Description |
|---|---|
void |
dispose()
Waits for running
AsyncTask instances to finish,
then destroys any resources like threads. |
boolean |
post(java.lang.Runnable task)
Submits a
Runnable to be executed asynchronously. |
public AsyncExecutor(int maxConcurrent,
org.oscim.utils.async.TaskQueue mainloop)
Runnable
instances to run in parallel.maxConcurrent - public boolean post(java.lang.Runnable task)
Runnable to be executed asynchronously. If
maxConcurrent runnables are already running, the runnable
will be queued.task - the task to execute asynchronouslypublic void dispose()
AsyncTask instances to finish,
then destroys any resources like threads. Can not be used
after this method is called.dispose in interface com.badlogic.gdx.utils.Disposable