<br><br><div class="gmail_quote">On Mon, Oct 1, 2012 at 5:38 AM, Paul Wiseman <span dir="ltr">&lt;<a href="mailto:poalman@gmail.com" target="_blank">poalman@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br><div>I made an api for the web requests- the call isn&#39;t so straightforward, all the information is sent in POST formatted a certain way and there&#39;s also a credentials part with a token and other bits with secrets used to auth the request. So for instance I call the list dir method in the api and get back a Response type object based on the web response. Is there still way I can defer the returning of that web call, or would I need to tear the api apart to use twisted deferred objects internally? or is this something Agent could deal with?</div>
</blockquote><div><br>Agent could certainly deal with this; alternatively, if you&#39;re using a blocking API you could use deferToThread (make sure the function you call that way doesn&#39;t touch any global state or call any Twisted APIs.) <br>
</div></div><br>-- <br>Itamar Turner-Trauring, Future Foundries LLC<br><a href="http://futurefoundries.com/" target="_blank">http://futurefoundries.com/</a> — Twisted consulting, training and support.<br><br>