<div dir="ltr">Hello,<div><br></div><div>I'm trying to adopt the Ruby event example from here <a href="https://www.libvirt.org/ruby/examples/event_test.rb" target="_blank">https://www.libvirt.org/ruby/examples/event_test.rb</a> to use EventMachine (a library for writing event driven programs).</div><div><br></div><div>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:</div><div><div>add_handle fd=11 events=1</div><div>add_timer interval=-1</div><div>:notify_readable id=0 fd=11 events=1</div><div>update_timer id=0 interval=0</div><div>:notify_readable id=0 fd=11 events=1</div><div>:notify_readable id=0 fd=11 events=1</div></div><div>...</div><div><br></div><div>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?<br></div><div><div><br></div><div>Many thanks</div>-- <br><div>Jonathan Barber <<a href="mailto:jonathan.barber@gmail.com" target="_blank">jonathan.barber@gmail.com</a>></div>
</div></div>