[Twisted-Python] Re: deferToThread - supported alternative to the (deprecated) setTimeout method

glyph at divmod.com glyph at divmod.com
Fri May 26 14:19:47 MDT 2006



On Fri, 26 May 2006 20:46:27 +0100, Paul Moore <pf_moore at yahoo.co.uk> wrote:

>>Consider using subprocesses to do your blocking work.
>
>That's possible, but I'm running on Windows and subprocess management
>is not as manageable on that platform (even under Python/twisted). But
>it is a thought, and I'll keep it in mind.

While Twisted uses some rather gross APIs, and polling, to get subprocess management working on win32, and it's therefore not very high performance, it _does_ work, performs reasonably under average load (sockets are generally higher performance than stdin/stdout on all platforms, so if you have really large volumes of data to send to your subprocess you might want to use one of those anyway.), and is supported, especially in the most recent 2.4 release.  (No win32 installers for that yet; you'll have to build it yourself from the tarball).

Although the Python APIs differ substantially, the Twisted APIs for managing processes and communicating with them should be identical on Windows.




More information about the Twisted-Python mailing list