[PyQt] Worker Thread

Matt Smith melkor at orangepalantir.org
Wed Feb 4 12:03:19 GMT 2009


It seems like your worker thread should start, I don't really like how
you've set it up, but I think it should start, so I am going to suggest
that "pow" is too much for it.  Ie it is taking all of the resources
your application gets.  Really what you should do in that case is use
multiprocessing.  Plus 'terminate()' is not going to do what you want.  

 So maybe you should use multiprocessing.  I don't have multiprocessing
installed, yet, but create a thread and then when you use .start() have
your thread start a process.  This will give you access to terminate,
which will be like hitting ctrl-c

http://docs.python.org/library/multiprocessing.html

And there is a version of multiprocessing for 2.5 if you are running
that.

mbs



More information about the PyQt mailing list