[Python-ideas] Tulip / PEP 3156 event loop implementation question: CPU vs. I/O starvation
Markus
nepenthesdev at gmail.com
Sat Jan 12 14:01:40 CET 2013
Hi,
On Sat, Jan 12, 2013 at 12:41 AM, Guido van Rossum <guido at python.org> wrote:
> def hogger():
> tulip.get_event_loop().call_soon(hogger)
>
> Because call_soon() appends the handler to the _ready queue, the while
> loop will never finish.
Adding a poll-able descriptor to the the loop will eval it in the next
iteration of the loop, so why make a difference with timers?
Define call_soon to be called in the next iteration - not in the same.
Basically every modification of the event loop should be evaluated in
the next iteration, not the same.
MfG
Markus
More information about the Python-ideas
mailing list