<br><br><div><span class="gmail_quote">On 2/14/07, <b class="gmail_sendername">Greg Ewing</b> &lt;<a href="mailto:greg.ewing@canterbury.ac.nz">greg.ewing@canterbury.ac.nz</a>&gt; wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Phillip J. Eby wrote:<br>&gt; peak.events, for example, lets you have multiple event loops<br>&gt; running in the same or different threads.<br><br>Different threads is okay if you&#39;re willing to use threads,<br>but you might not. The reason you&#39;re using an event loop
<br>may well be precisely so that you *don&#39;t* have to use<br>threads.<br><br>And... how do you run multiple event loops simultaneously<br>in the *same* thread? That sounds self-contradictory to<br>me.</blockquote><div>
<br>If all (or all-but-one) of them have a &#39;run one iteration&#39; method, you can call that from the &#39;main&#39; mainloop. Or you can design all mainloops as coroutines and have them call each other. (I haven&#39;t looked at Phillip&#39;s approach at all, but something tells me coroutines are involved :-)
<br></div><br></div>-- <br>Thomas Wouters &lt;<a href="mailto:thomas@python.org">thomas@python.org</a>&gt;<br><br>Hi! I&#39;m a .signature virus! copy me into your .signature file to help me spread!