Class: LibvirtAsync::Handle::Monitor
- Inherits:
-
Async::Wrapper
- Object
- Async::Wrapper
- LibvirtAsync::Handle::Monitor
- Defined in:
- lib/libvirt_async/handle.rb
Overview
Represents an event handle (usually a file descriptor). When an event happens to the handle, we dispatch the event to libvirt via Libvirt::Event.invoke_handle_callback (feeding it the handle_id we returned from add_handle, the file descriptor, the new events, and the opaque data that libvirt gave us earlier).
Instance Method Summary collapse
Instance Method Details
#close ⇒ Object
12 13 14 |
# File 'lib/libvirt_async/handle.rb', line 12 def close cancel_monitor end |
#inspect ⇒ Object
24 25 26 |
# File 'lib/libvirt_async/handle.rb', line 24 def inspect to_s end |
#readiness ⇒ Object
16 17 18 |
# File 'lib/libvirt_async/handle.rb', line 16 def readiness monitor&.readiness end |
#to_s ⇒ Object
20 21 22 |
# File 'lib/libvirt_async/handle.rb', line 20 def to_s "#<#{self.class}:0x#{object_id.to_s(16)} readable=#{@readable&.object_id&.to_s(16)} writable=#{@writable&.object_id&.to_s(16)} alive=#{@monitor && !@monitor.closed?}>" end |