Class NIO::Selector
In: lib/nio/selector.rb
Parent: Object

Selectors monitor IO objects for events of interest

Methods

close   closed?   deregister   empty?   new   register   registered?   select   wakeup  

Public Class methods

Public Instance methods

Close this selector and free its resources

Is this selector closed?

Deregister the given IO object from the selector

Register interest in an IO object with the selector for the given types of events. Valid event types for interest are:

  • :r - is the IO readable?
  • :w - is the IO writeable?
  • :rw - is the IO either readable or writeable?

Is the given IO object registered with the selector?

Select which monitors are ready

Wake up a thread that‘s in the middle of selecting on this selector, if any such thread exists.

Invoking this method more than once between two successive select calls has the same effect as invoking it just once. In other words, it provides level-triggered behavior.

[Validate]