Thread performance

Dan Boitnott danslists at
Tue Mar 23 18:19:21 CET 2004

Moe A wrote:
> I'm writing a multi-threaded app in python that uses pygtk..and
> obviously the performance of subroutines invoked from a thread rather
> than from a GUI callback leave something to be desired.  i cant
> implement a simple lock system because most of the threads are started
> from the various modules i'm using.  so is there some way to
> commandeer the majority of processing power from one of the threads
> without making the gui unresponsive?

Check out this article:

It describes using generators as substitutes for threads.  This approach 
works by moving the instruction pointer around instead of switching 
contexts on and off the processor.

Dan Boitnott

More information about the Python-list mailing list