Interface EventLoop


public interface EventLoop
Discovered using ServiceLoader. At most one implementation may be present on the classpath.
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns an Executor that runs tasks on the current thread's event loop.
    static EventLoop
    get()
     
  • Method Details

    • executor

      Executor executor()
      Returns an Executor that runs tasks on the current thread's event loop. If the current thread is not an event loop thread, returns null.

      Pay attention to when you call this method. If you want to later use an executor for current thread's event loop, possibly even from a different thread, call this method early and remember the result.

    • get

      static EventLoop get()