[Twisted-Python] Wrapping blocking code
dizzyd at jabber.org
Wed Jul 23 16:42:15 EDT 2003
-----BEGIN PGP SIGNED MESSAGE-----
Sounds to me like you want to use a deferToThread(...), to pass the
calls off to the reactor's thread pool so they can run there without
holding up the reactor's runloop.
Hope that helps. :)
On Wednesday, Jul 23, 2003, at 10:16 America/Denver, Justin Johnson
> I have some code in my xmlrpc service that executes commands using
> process.py (http://starship.python.net/crew/tmick/). The service
> to block this code, thus only allowing one connection to get any work
> done at a time, at least while the commands are being executed.
> Should I
> be wrapping this up in a Deferred somehow to avoid blocking?
> Slowly but surely this is starting to make sense to me. Twisted rocks!
> Twisted-Python mailing list
> Twisted-Python at twistedmatrix.com
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (Darwin)
-----END PGP SIGNATURE-----
More information about the Twisted-Python