Displaying 2 results from an estimated 2 matches for "register_default".
2014 Mar 14
0
Re: Sys::Virt integration into other event loops
...ny events happened during
> the period, but we’d like something more responsive (i.e., triggers when
> the event actually occurs) and less poll-y feeling.
So there are a few options for integrating with libvirt's event loop
- Use the default impl we provide by calling Sys::Virt::Event::register_default
and Sys::Virt::Event::run_default. This is what the example program does
and it sounds like what you're doing
- Register and run your own event loop impl by calling the method
Sys::Virt::Event::register(), passing in a custom subclass of
the Sys::Virt::Event class. This is what yo...
2014 Mar 14
3
Sys::Virt integration into other event loops
Hi all,
I’m trying to integrate Perl’s Sys::Virt into an already existing AnyEvent program.
I’m accustomed to writing things like this:
use EV;
use AnyEvent;
use AnyEvent::Handle;
my $h = AnyEvent::Handle->new(fh => $fh, …);
$h->on_read(sub { … });
EV::run; ## start the event loop
I can add some code in the on_read() handler and every time the $fh has something to read, it will fire