public interface TaskExecutor
extends org.mini2Dx.gdx.utils.Disposable
| Modifier and Type | Method and Description |
|---|---|
void |
execute(java.lang.Runnable runnable)
Queues a
Runnable instance to be run on a separate thread |
void |
setMaxFrameTasksPerFrame(int max)
Sets the maximum number of
FrameSpreadTask instances to update per frame |
<T> AsyncResult<T> |
submit(java.util.concurrent.Callable<T> callable)
Submits a
Callable instance to be executed on a separate thread |
void |
submit(FrameSpreadTask task)
Submits a
FrameSpreadTask to be completed over several frames |
AsyncFuture |
submit(java.lang.Runnable runnable)
Submits a
Runnable instance to be executed on a separate thread |
void |
update(float delta)
Updates
FrameSpreadTask instances each frame. |
void update(float delta)
FrameSpreadTask instances each frame.
Note: This is called by mini2Dx and should not be called manually.delta - The game delta timevoid execute(java.lang.Runnable runnable)
Runnable instance to be run on a separate threadrunnable - The task to run on a separate threadAsyncFuture submit(java.lang.Runnable runnable)
Runnable instance to be executed on a separate threadrunnable - The task to run on a separate threadAsyncFuture instance that can be checked for task completion<T> AsyncResult<T> submit(java.util.concurrent.Callable<T> callable)
Callable instance to be executed on a separate threadT - The return typecallable - The task to run on a separate threadAsyncResult instance that can be checked for task completionvoid submit(FrameSpreadTask task)
FrameSpreadTask to be completed over several framestask - The FrameSpreadTask to executevoid setMaxFrameTasksPerFrame(int max)
FrameSpreadTask instances to update per framemax - The maximum number greater than 0