[Twisted-Python] Synchronous Wrapper for Deferreds
Ken Kinder
ken at kenkinder.com
Fri Mar 18 23:12:36 MST 2005
No, and a google search reveals that there has been relatively little
dicussion about them. They do look like at least part of what I need. It
hadn't occured to me to even look in the unit testing stuff - thanks.
-Ken
Eric Mangold wrote:
>Did anyone tell you about twisted.trial.util.deferredResult and
>deferredError?
>
>
>
>>A day or two ago, I inquired on IRC about making calls from an existing
>>synchronous script. The script is not related to any Twisted activity,
>>so minimal intervention was sort of a goal. Obviously this doesn't work
>>on non-transient objects such as Perspective Broker ones, but here's
>>what I came up with... (See attached) Obviously there is some cleaning
>>up to do, but it demonstrates the idea.
>>
>>I have three questions: (1) I know this isn't the ideal way to use
>>Twisted, but is there anything inherently problematic about my solution
>>for one-off calls to Twisted. (2) I understand there are problems with
>>running the same reactor twice. What are those problems and is there a
>>recommended work around? (3) Are there any ideas on making a synchronous
>>version of a Perspective Broker client to integrate into existing
>>synchronous applications more easily?
>>
>>Thanks
>>-Ken
>>
>>
>>
More information about the Twisted-Python
mailing list