[PyQt] GUI freezing when running large function in QThread

Erik Janssens Erik.Janssens at conceptive.be
Wed Jul 22 22:06:07 BST 2009


I'm doing exactly the same in our application (Validation and database
access in a separate thread), and I have no issues whatsoever with the
GUI still freezing. 

So I'm not sure either if the GIL is causing this and if you really need
to spawn another process (given the additional issues this brings).

But for the sake of the argument, I'd like to now as well when and when
not the GIL can cause such things ?

If you interface to C code within your validation, does the interface
release the GIL ?

> 
> Message: 4
> Date: Tue, 21 Jul 2009 09:34:38 -0700
> From: Brent Villalobos <Brent.Villalobos at pdi.dreamworks.com>
> Subject: Re: [PyQt] GUI freezing when running large function in
> 	QThread
> To: pyqt at riverbankcomputing.co.uk
> Message-ID: <4A65EE1E.7000301 at pdi.dreamworks.com>
> Content-Type: text/plain; charset=ISO-8859-1; format=flowed
> 
> Thanks.  I had a feeling that python's GIL (global interpreter lock) 
> would be a limiting factor.  I worked around my performance issue by 
> doing some smarting caching to avoid some of the more intensive 
> operations.  But for the sake of argument, suppose I couldn't rework my 
> algorithms.  From what I can gather, is the common consensus that I need 
> to spin off new processes?
> 




More information about the PyQt mailing list