SelectSelector.select

Wait for I/O events from the registered conduits for a specified amount of time.

  1. alias select = AbstractSelector.select
  2. int select(TimeSpan timeout)
    class SelectSelector
    override
    int
    select

Parameters

timeout TimeSpan

TimeSpan with the maximum amount of time that the selector will wait for events from the conduits; the amount of time is relative to the current system time (i.e. just the number of milliseconds that the selector has to wait for the events).

Return Value

Type: int

The amount of conduits that have received events; 0 if no conduits have received events within the specified timeout; and -1 if the wakeup() method has been called from another thread.

Throws

InterruptedSystemCallException if the underlying system call was interrupted by a signal and the 'restartInterruptedSystemCall' property was set to false; SelectorException if there were no resources available to wait for events from the conduits.

Meta