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.
_______________________________________________
Twisted-Python mailing list
Twisted-Python@twistedmatrix.com
http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python

Reply via email to