Interface AsynchronousRunner

All Superinterfaces:
ClosableResource
All Known Subinterfaces:
Queuable, RunnableQueue, ThreadPoolReportingAsynchronousRunner
All Known Implementing Classes:
CarefulRunnableQueue, RoundRobinAsynchronousRunner, SimpleRunnableQueue, ThreadPerTaskAsynchronousRunner, ThreadPoolAsynchronousRunner

public interface AsynchronousRunner extends ClosableResource
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    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
     
  • Method Details

    • postRunnable

      void postRunnable(Runnable r)
    • close

      void close(boolean skip_remaining_tasks)
      Finish with this AsynchronousRunner, and clean-up any Threads or resources it may hold.
      Parameters:
      skip_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.
    • close

      void close()
      Clean-up resources held by this asynchronous runner as soon as possible. Remaining tasks are skipped if possible, and any tasks executing when close() is called may or may not be interrupted. Equivalent to close( true ).
      Specified by:
      close in interface ClosableResource