EventLoop.iteration: sleep if no IO handlers
authorZac Medico <zmedico@gentoo.org>
Thu, 16 Feb 2012 04:58:10 +0000 (20:58 -0800)
committerZac Medico <zmedico@gentoo.org>
Thu, 16 Feb 2012 04:58:10 +0000 (20:58 -0800)
commit5697972e9f2a3021ca6ed99b24e23e32f7515bf9
treeb44e73d8fdd09bdea04eacf8a79d9bace364f398
parent611ec3edf3695453639f2436049d0005f6e6f769
EventLoop.iteration: sleep if no IO handlers

Sleep so that we don't waste cpu time by looping too quickly. This
makes EventLoop useful for code that needs to wait for timeout
callbacks regardless of whether or not any IO handlers are currently
registered.
pym/portage/util/_eventloop/EventLoop.py