SelectorLoop
A special thread that listens for events on the provided selector.
- Value Params
- bufferSize
Size of the scratch buffer instantiated for this thread.
- selector
Selector
to listen on.- threadFactory
Factory to make the
Thread
instance to run the loop.
- Note
when the
SelectorLoop
is closed all registeredSelectable
s are closed with it.
Type members
Value members
Concrete methods
Schedule to provided Runnable
for execution later
Schedule to provided Runnable
for execution later
The task will be added to the end of the queue of tasks scheduled for execution regardless of where this method is called.
- See also
executeTask
for a method that will execute the task now if the calling thread isthis
SelectorLoop
, or schedule it for later otherwise.
- Definition Classes
- ExecutionContext -> Executor
Schedule the provided Runnable
for execution, potentially running it now
Schedule the provided Runnable
for execution, potentially running it now
The provided task may be executed now if the calling thread is this
SelectorLoop
, otherwise it is added to the task queue to be executed by
the SelectorLoop
thread later.