Interface EventLoop
public interface EventLoop
Discovered using
ServiceLoader. At most one implementation may be present on the classpath.-
Method Summary
-
Method Details
-
isEventLoopThread
boolean isEventLoopThread()Returns whether current thread is an event loop thread.When this method returns
false, callingexecutor()doesn't make sense and throwsUnsupportedOperationException. -
executor
Executor executor()Returns anExecutorthat runs tasks on the current thread's event loop.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
-