EventLoop.child_watch_add: dynamic IO watch
authorZac Medico <zmedico@gentoo.org>
Fri, 17 Feb 2012 06:03:30 +0000 (22:03 -0800)
committerZac Medico <zmedico@gentoo.org>
Fri, 17 Feb 2012 06:03:30 +0000 (22:03 -0800)
commited9125487af39181bf3a00ba46a2bda7ea1d68d2
tree01bda38bb56888a27503987e73a539e0e7731fc3
parentbbcfd4e2ad7f9d97ee7bb027b5345c2d5bbb3997
EventLoop.child_watch_add: dynamic IO watch

The IO watch is dynamically registered and unregistered as needed,
since we don't want to consider it as a valid source of events when
there are no child listeners. It's important to distinguish when there
are no valid sources of IO events, in order to avoid an endless poll
call if there's no timeout. This fixes possbible endless poll calls
since commit 1979a6cdfcd8c6bae4565982d82d862be07ba5be.
pym/portage/util/_eventloop/EventLoop.py