Method: NIO::Selector#initialize
- Defined in:
-
lib/nio/selector.rb,
ext/nio4r/selector.c
Instance methods
16 17 18 19 20 21 22 23 24 25 |
# File 'lib/nio/selector.rb', line 16 def initialize(backend = :ruby) raise ArgumentError, "unsupported backend: #{backend}" unless backend == :ruby @selectables = {} @lock = Mutex.new # Other threads can wake up a selector @wakeup, @waker = IO.pipe @closed = false end |