Package org.ngengine.runner
Interface Runner
- All Known Implementing Classes:
MainThreadRunner,PassthroughRunner
public interface Runner
A runner runs tasks in its own thread.
-
Method Summary
Modifier and TypeMethodDescriptionvoidvoidEnqueue a task to be run in the runner's thread.voidRun a task in the runner's thread, asap.
-
Method Details
-
run
Run a task in the runner's thread, asap.- Parameters:
task-
-
enqueue
Enqueue a task to be run in the runner's thread. This is the same asrun(Runnable)but the task will be enqueued even if the call happens in the runner's thread.Generally, this is useful only for special use cases, like ensuring the thread doesn't get overloaded with too many tasks all at once. Otherwise just use
run(Runnable).- Parameters:
task-
-
checkThread
void checkThread()
-