[IPython-user] Multithreading shell simplified, testing needed
Ville M. Vainio
vivainio@gmail....
Wed Mar 12 12:17:35 CDT 2008
On Wed, Mar 12, 2008 at 3:24 PM, Darren Dale <darren.dale@cornell.edu> wrote:
> I am also testing by starting python with -gthread, q4thread, etc, and running
> the various embedding_in_* scripts in matplotlibs examples archive.
>
> When I tested -gthread, I found a corner case that failed with the gtk
> backend, but it does so with the old code as well:
The problem with these cases is that the mainloop thread is dead (or
at least doesn't do the periodic run of the "runsource" anymore) when
you delete the window. You don't have to do exit - doing something
like 1+1 will block it as well.
This is obviously not the problem with new code, but the design of the backends.
Here's an idea on how to fix this: we add another event that tells
that the message was "received" (popped from queue), and wait for THAT
with a timeout. If the message is not received within, say, 5 seconds,
we declare the mainloop dead and switch to direct execution code with
a warning to the user.
--
Ville M. Vainio - vivainio.googlepages.com
blog=360.yahoo.com/villevainio - g[mail | talk]='vivainio'
More information about the IPython-user
mailing list