<meta charset="utf-8"><span class="Apple-style-span" style="font-family: arial, sans-serif; font-size: 13px; border-collapse: collapse; ">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. </span><div>
<span class="Apple-style-span" style="font-family: arial, sans-serif; font-size: 13px; border-collapse: collapse; "><div><br></div><div>For instance I would change twisted.web.soap.render  where it says d = defer.maybeDeferred to  d = threads.deferToThread</div>
<div><br></div><div>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)</div><div><br></div><div>Is this actually a good idea? I figured there might be a reason this wasn&#39;t done already considering everything in twisted is pretty well thought out.</div>
</span><br></div>