[libvirt] [RFC] Events API

Daniel P. Berrange berrange at redhat.com
Fri Sep 19 10:37:11 UTC 2008

On Fri, Sep 19, 2008 at 11:30:01AM +0100, Richard W.M. Jones wrote:
> On Fri, Sep 19, 2008 at 11:22:24AM +0100, Daniel P. Berrange wrote:
> > Making a client poll for events is evil because it prevents the CPU
> > going into low power mode when nothing is happening.
> Didn't mean literally poll of course :-)
> > Exposing a FD severely limits your flexibility, because libvirt then
> > has no control over when the FD is being monitored - you may well
> > not want it being select'd on all the time - and/or want to change
> > the events being monitored for at various times.
> Yup, didn't get down to the bottom of your other email.  Exposing an
> FD is also tricky on Windows too (where you have the joys of
> "WSAWaitForMultipleEvents"), so best to avoid it if possible.  If
> someone (dbus? glib?) has solved this in a platform-independent way
> already then so much the better.

The glib event loop implementation on Windows is built using the
WSAWaitForMultipleEvents API, so any libvirt-glib.so impl of the
events.h API would 'just work' in this respect

|: Red Hat, Engineering, London   -o-   http://people.redhat.com/berrange/ :|
|: http://libvirt.org  -o-  http://virt-manager.org  -o-  http://ovirt.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: GnuPG: 7D3B9505  -o-  F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :|

More information about the libvir-list mailing list