[PyKDE] Threading and multiple processors, any change?

Matt Newell newellm at blur.com
Thu Mar 1 18:25:06 GMT 2007


On Thursday 01 March 2007 03:16, Phil Thompson wrote:
> On Thursday 01 March 2007 10:47 am, V. Armando Sole wrote:
> > Hello,
> >
> > I just have a simple question (that does not imply a simple answer).
> >
> > With all the new options/possibilities recently discussed concerning the
> > GIL handling, is it possible to profit of multiple processors in Python
> > using QThreads thru PyQt4?
>
If a large amount of the time is spent in C++(Qt, or your own custom sip 
modules), then yes, it should allow more concurrency.  Already using QThreads 
could be a big win if the threads spend time blocking on IO or other 
operations that already released the GIL.

> The issues of a single GIL haven't gone away. The only difference is that
> the GIL is (probably) released much more frequently than it was before. The
> changes are to do with correctness (specifically deadlock avoidance) rather
> than performance.
>
> I don't know what the performance effect would be on a multi-processor.
> Matt said that he could run more threads but I don't know what hardware he
> has. I noticed a (small) degradation on my uni-processor - as would be
> expected.
I'm running a dual proc, single core xeon(3.06Ghz), so it would make sense 
that I gained a bit of performance, though it was only my impression.

Matt




More information about the PyQt mailing list