libvirt events and Ruby's EventMachine

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello,

I'm trying to adopt the Ruby event example from here https://www.libvirt.org/ruby/examples/event_test.rb to use EventMachine (a library for writing event driven programs).

I have attached my attempt, which appears subscribe to events but never executes the callbacks I provide. I know this because when I reset domains (virsh reset VM) I see messages appear from the Handlers::notify_readable(), which should then invoke Libvirt::event_invoke_handle_callback() - but the output from the callbacks never appears. Typical output from the program looks like:
add_handle fd=11 events=1
add_timer interval=-1
:notify_readable id=0 fd=11 events=1
update_timer id=0 interval=0
:notify_readable id=0 fd=11 events=1
:notify_readable id=0 fd=11 events=1
...

When I enabled debugging by setting LIBVIRT_DEBUG to 1 the output from libvirt appears to be the same as event_test.rb (excluding memory addresses). Can anyone see where I'm going wrong?

Many thanks
--
Jonathan Barber <jonathan.barber@xxxxxxxxx>

Attachment: libvirt-event-machine.rb
Description: application/ruby

_______________________________________________
libvirt-users mailing list
libvirt-users@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvirt-users

[Index of Archives]     [Virt Tools]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [KDE Users]

  Powered by Linux