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 <[email protected]> > Subject: Re: [PyQt] GUI freezing when running large function in > QThread > To: [email protected] > Message-ID: <[email protected]> > 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? > _______________________________________________ PyQt mailing list [email protected] http://www.riverbankcomputing.com/mailman/listinfo/pyqt
