Class: EventMachine::POSIX::Spawn::Child::SignalHandler::SignalNotifier

Inherits:
EM::Connection
  • Object
show all
Defined in:
lib/em/posix/spawn/child.rb

Instance Method Summary collapse

Constructor Details

#initialize(handler) ⇒ SignalNotifier

Returns a new instance of SignalNotifier.



181
182
183
# File 'lib/em/posix/spawn/child.rb', line 181

def initialize(handler)
  @handler = handler
end

Instance Method Details

#notify_readableObject



185
186
187
188
189
190
191
192
# File 'lib/em/posix/spawn/child.rb', line 185

def notify_readable
  begin
    @io.read_nonblock(65536)
  rescue IO::WaitReadable
  end

  @handler.signal
end