[SciPy-user] Re: [AstroPy] Re: gui/thread issues

Fernando.Perez at colorado.edu Fernando.Perez at colorado.edu
Mon May 23 16:45:12 EDT 2005


Quoting Perry Greenfield <perry at stsci.edu>:

>
> On May 23, 2005, at 2:58 PM, Fernando Perez wrote:
> >
> > The issues with the GIL are still there, so any long-running command
> > which doesn't release the GIL will still block.  But it does give some
> > advantages.
> >
> >
> Isn't that mainly an issue as to whether things can run concurrently?
> As far as event handling, even when the GIL blocks, there still should
> be thread switches on a regular basis within Python code so that even
> though only one thread runs at a time, the events will be handled
> during most long-running functions (perhaps not long-running extension
> functions). But maybe I'm mixed up on that.

You are perfectly correct.  What I had in mind (but I wasn't explicit enough) is
the common (for scientific users) of calling a long-running C extension (say an
eigenvalue calculation for a large matrix).  This will block the GUI, since
there are no thread switches happening at that point.

Regards,

f




More information about the SciPy-User mailing list