[Twisted-Python] Mimicking a blocking API using Twisted

Laurens Van Houtven _ at lvh.cc
Sun Mar 25 17:02:12 EDT 2012


I'm trying to find out if there's a reasonable way to mimic a blocking API
with an existing non-blocking API. I want to do this so I can write

For example, I want to make a remote AMP call. It returns a deferred.
Instead of returning a deferred, I want it to block until the deferred

The "obvious" way to do this would be to run the reactor in a different
thread. This would not be necessary if the reactor were restartable, but it

I've found at least one mailing list issue where someone wanted something
similar, but did not see a resolution.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://twistedmatrix.com/pipermail/twisted-python/attachments/20120325/71b55044/attachment.htm 

More information about the Twisted-Python mailing list