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
10 11 12 |
# File 'lib/libvirt_async/handle.rb', line 10 def close cancel_monitor end |
#inspect ⇒ Object
22 23 24 |
# File 'lib/libvirt_async/handle.rb', line 22 def inspect to_s end |
#readiness ⇒ Object
14 15 16 |
# File 'lib/libvirt_async/handle.rb', line 14 def readiness monitor&.readiness end |
#to_s ⇒ Object
18 19 20 |
# File 'lib/libvirt_async/handle.rb', line 18 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 && [email protected]?}>" end |