thank you for sharing your experience. <br>Frankly, I do love twisted for its decent implementation of asyn call concept.<br><br><div class="gmail_quote">2009/8/28 Phil Christensen <span dir="ltr">&lt;<a href="mailto:phil@bubblehouse.org">phil@bubblehouse.org</a>&gt;</span><br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div class="im">On Aug 27, 2009, at 10:57 AM, ÌÕÒÕ·ò wrote:<br>
&gt; Thank you, Phil.<br>
&gt;<br>
&gt; Pyro has many examples, so I can understand it easily. I know<br>
&gt; Twisted is great. I think your &quot;switching&quot; must mean something :) .<br>
&gt; So I decide to use twisted PB.<br>
<br>
<br>
</div>Great!<br>
<br>
I also remembered one thing that I found was extremely useful when<br>
dealing with a GUI app that communicates over PB. Since PB assumes<br>
every remote method call will take an arbitrary amount of time to<br>
execute, you can delay the response from the client as long as you need.<br>
<br>
For example, let&#39;s say the server sends a block of text to the client<br>
for editing. Your client-side function can create a Deferred, hold a<br>
reference to it somewhere, and return that from the client function.<br>
<br>
PB won&#39;t actually send a response until you invoke the callback()<br>
method on that Deferred, so you can pop open a GUI window, let the<br>
user edit the text (or just sit there staring at it for an hour), and<br>
then trigger the callback when the user hits &#39;Save&#39;.<br>
<br>
Very useful, although I wrote some incredibly stupid code to emulate<br>
this long before I realized how easy it was ;-)<br>
<div><div></div><div class="h5"><br>
-phil<br>
_______________________________________________<br>
Twisted-Python mailing list<br>
<a href="mailto:Twisted-Python@twistedmatrix.com">Twisted-Python@twistedmatrix.com</a><br>
<a href="http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python" target="_blank">http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python</a><br>
</div></div></blockquote></div><br>