[libvirt] [PATCH][libvirt-glib] glib-events: Allow zero timeouts for timer

Christophe Fergeau cfergeau at redhat.com
Tue May 22 16:04:28 UTC 2012


On Tue, May 22, 2012 at 05:37:25PM +0200, Michal Privoznik wrote:
> In libvirt, it's perfectly possible and widely used to have disabled
> timers (timeout=-1) and fire them up 'randomly' with timeout=0.
> However, with current mapping into glib mainloop it's not possible
> and causing troubles.

The code is more logical this way, when updating a timeout, we want to
remove the currently pending timeout callback, and reschedule a new one
with the updated value. Thanks a lot for tracking this down!
Looks good to me, but better if someone else ACKs it since I suggested this
change ;)

Christophe
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20120522/19189982/attachment-0001.sig>


More information about the libvir-list mailing list