<br><br><div><span class="gmail_quote">On 2/14/07, <b class="gmail_sendername">Greg Ewing</b> <<a href="mailto:greg.ewing@canterbury.ac.nz">greg.ewing@canterbury.ac.nz</a>> 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>> peak.events, for example, lets you have multiple event loops<br>> running in the same or different threads.<br><br>Different threads is okay if you're willing to use threads,<br>but you might not. The reason you're using an event loop
<br>may well be precisely so that you *don'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 'run one iteration' method, you can call that from the 'main' mainloop. Or you can design all mainloops as coroutines and have them call each other. (I haven't looked at Phillip's approach at all, but something tells me coroutines are involved :-)
<br></div><br></div>-- <br>Thomas Wouters <<a href="mailto:thomas@python.org">thomas@python.org</a>><br><br>Hi! I'm a .signature virus! copy me into your .signature file to help me spread!