Hi, On Friday 10 April 2009 20:26:37 Jason Voegele wrote: > I am a relative newcomer to Python and I don't know much about the Global > Interpreter Lock (GIL) in general. However, I am developing a PyQt > application that makes fairly heavy use of QThread to perform multiple > tasks concurrently. I've heard some vague statements that PyQt manages the > GIL automatically, but can someone give a more precise statement about how > the GIL works for PyQt applications, especially when QThread is involved? > Are there any gotchas that I need to look out for?
Are your QThread-derived threads written in python or in C++? If they are python, you hit the same limitation the threading-derived threads hit: Only one thread can be executed in the python-interpreter at a time. And even if PyQt releases the GIL automaticly, it can't release it if you are executing python-code. If your threads are C++ classes I think SIP/PyQt will release the GIL so your threads will truly run in parallel (assuming you have more then one processor). Have fun, Arnold
signature.asc
Description: This is a digitally signed message part.
_______________________________________________ PyQt mailing list PyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt