Re: issues with Trellis event loops and threads

"Phillip J. Eby" <pje-Wh6+Hckhi6HFNGf7iClzIwC/[email protected]>
Newsgroups gmane.comp.python.peak
Message-ID <[email protected]>
At 07:29 PM 7/23/2008 +0300, Sergey Schetinin wrote:
>Thanks for your help, I really appreciate it.
>
> >> Also, I think I found a bug with the basic EventLoop implementation --
> >> the main loop never exits if there were any events scheduled,
> >
> > That is correct and intended behavior.  You are meant to explicitly
> > terminate event loops; it's an extra feature of the basic EventLoop that it
> > automatically exits when nothing is queued or scheduled.
>
>That's unexpected. Given that EventLoops are not supposed to be used
>in multithreaded context an infinite loop doing nothing looked odd.

Virtually all event loop implementations run until explicitly 
stopped.  PEAK's event loops are actually quite unusual in that they 
are capable of stopping automatically if there are no future events 
and no pending callbacks.

Compare with wx, Twisted, asyncore, the stdlib socket server classes, 
almost any GUI event loop, etc.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.