[Twisted-Python] CPU intensive threads

Itamar Shtull-Trauring itamar at itamarst.org
Wed Jul 27 10:40:18 EDT 2005

On Tue, 2005-07-26 at 17:44 -0600, Nathaniel Haggard wrote:

> When I run a CPU intensive method via threads.deferToThread it takes
> all the CPU away and renders the twisted process unresponsive.  The
> perspective broker for example will not make any connections until the
> CPU intensive methods finish.

If it's a C extension you'll want to release the global interpreter lock
when possible, otherwise other threads will *never* run, regardless of
how much CPU you code uses.

More information about the Twisted-Python mailing list