[Twisted-Python] Deferred SOAP methods
landreville at deadtreepages.com
Fri Nov 13 09:52:36 EST 2009
I am making a SOAP server and all (or at least the vast majority) will be
returning a deferred. The whole SOAP method is encapsulated in a deferred in
most of my cases (I havent implemented this part yet.) Then I got the idea
that twisted.web.soap could just wrap my SOAP method (retrieved with
lookupFunction) in a deferred and return that deferred right away.
For instance I would change twisted.web.soap.render where it says d =
defer.maybeDeferred to d = threads.deferToThread
I could also use an attribute to specify if I do not want it deferred (kinda
the same way to determine whether to use keywords or not)
Is this actually a good idea? I figured there might be a reason this wasn't
done already considering everything in twisted is pretty well thought out.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Twisted-Python