<br><br><div><span class="gmail_quote">2007/3/21, Jean-Paul Calderone <<a href="mailto:exarkun@divmod.com">exarkun@divmod.com</a>>:</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 <<a href="mailto:wgwigw@gmail.com">wgwigw@gmail.com</a>> wrote:<br>>the document said:<br>># run method in thread<br>>reactor.callInThread(aSillyBlockingMethod, "2 seconds have passed")
<br>>but after above code, Is that Thread dead? and how can I re-use this thread?<br>>and if I create a thread using python thread module, can I use reactor to<br>>re-use it?<br>>there is a threadpool in twisted, is there any example of how to use it?
<br>>thanks for any advices.<br>><br><br>callInThread uses a threadpool. 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>