Class AsyncExecutor

  • All Implemented Interfaces:
    com.badlogic.gdx.utils.Disposable

    public class AsyncExecutor
    extends java.lang.Object
    implements com.badlogic.gdx.utils.Disposable
    GWT emulation of AsynchExecutor, will call tasks immediately :D
    • Constructor Summary

      Constructors 
      Constructor Description
      AsyncExecutor​(int maxConcurrent, org.oscim.utils.async.TaskQueue mainloop)
      Creates a new AsynchExecutor that allows maxConcurrent Runnable instances to run in parallel.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method 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.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • AsyncExecutor

        public AsyncExecutor​(int maxConcurrent,
                             org.oscim.utils.async.TaskQueue mainloop)
        Creates a new AsynchExecutor that allows maxConcurrent Runnable instances to run in parallel.
        Parameters:
        maxConcurrent -
    • Method Detail

      • post

        public boolean post​(java.lang.Runnable task)
        Submits a Runnable to be executed asynchronously. If maxConcurrent runnables are already running, the runnable will be queued.
        Parameters:
        task - the task to execute asynchronously
      • dispose

        public void dispose()
        Waits for running AsyncTask instances to finish, then destroys any resources like threads. Can not be used after this method is called.
        Specified by:
        dispose in interface com.badlogic.gdx.utils.Disposable