<br><br><div><span class="gmail_quote">2007/3/21, Jean-Paul Calderone &lt;<a href="mailto:exarkun@divmod.com">exarkun@divmod.com</a>&gt;:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
On Wed, 21 Mar 2007 10:01:11 +0800, wang wei &lt;<a href="mailto:wgwigw@gmail.com">wgwigw@gmail.com</a>&gt; wrote:<br>&gt;the document said:<br>&gt;# run method in thread<br>&gt;reactor.callInThread(aSillyBlockingMethod, &quot;2 seconds have passed&quot;)
<br>&gt;but after above code, Is that Thread dead? and how can I re-use this thread?<br>&gt;and if I create a thread using python thread module, can I use reactor to<br>&gt;re-use it?<br>&gt;there is a threadpool in twisted, is there any example of how to use it?
<br>&gt;thanks for any advices.<br>&gt;<br><br>callInThread uses a threadpool.&nbsp;&nbsp;If you use it again after the first function<br>finishes, it is quite likely that the same thread will be used to service the<br>second request.
<br><br>If you want, you can also create your own twisted.python.threadpool.ThreadPool<br>instance and dispatch calls to it.<br><br>Jean-Paul<br><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">http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python
</a><br></blockquote></div>thanks, I get the idea. Is there any examples on how to use it? <br>