Class: Async::Debug::Monitor

Inherits:
Delegator
  • Object
show all
Defined in:
lib/async/debug/monitor.rb

Instance Method Summary collapse

Constructor Details

#initialize(monitor, selector) ⇒ Monitor

Returns a new instance of Monitor.



28
29
30
31
# File 'lib/async/debug/monitor.rb', line 28

def initialize(monitor, selector)
  @monitor = monitor
  @selector = selector
end

Instance Method Details

#__getobj__Object



33
34
35
# File 'lib/async/debug/monitor.rb', line 33

def __getobj__
  @monitor
end

#closeObject



37
38
39
40
# File 'lib/async/debug/monitor.rb', line 37

def close
  @selector.deregister(self)
  @monitor.close
end

#inspectObject



42
43
44
# File 'lib/async/debug/monitor.rb', line 42

def inspect
  "\#<#{self.class} io=#{@monitor.io.inspect} interests=#{@monitor.interests.inspect} readiness=#{@monitor.readiness.inspect}>"
end