[Libvir] Re: Asynchronous notifications of domain start/stop

Gerd Hoffmann kraxel at redhat.com
Wed Jul 18 12:03:24 UTC 2007


Daniel Veillard wrote:
>   If you give directly the fd of the socket used to talk internally to the
> daemon then you must allow for case where there is data to read but no
> even will be generated in the function, because since you don't have the
> library filtering you can't be sure what's available is something the
> application is interested in.

I don't see that as a problem.  Just process the data and return "no
event for you yet" to the application.

>   For example if doing a migration a lot of traffic may happen on multiple
> sockets before the user see an event he's actually interested into.
> There is so much nastyness once you break the purely synchronous model.

I don't expect to be notified truely async, i.e. while some
virDomMigrate() call is in progress.  I just want be able to -- for
example -- get notified about new domains showing up while sitting
around idle without polling once per second.  Not sending notifications
while other operations are in progress is fine, just queue them up and
send them once the migration is done.

cheers,
  Gerd





More information about the libvir-list mailing list