i can do that, will use my config file, <br>thanks much <br>and thanks for the link.<br><br><br>shawn<br><br><div><span class="gmail_quote">On 1/4/07, <b class="gmail_sendername">Kent Johnson</b> <<a href="mailto:kent37@tds.net">
kent37@tds.net</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">shawn bright wrote:<br>> hello there all,<br>><br>
> i have a python reference book that got me started knowing how to use<br>> threads, i can declare one as a class, and start it like this<br>><br>> class SomeThread(threading.Thread):<br>><br>><br>> run_process = SomeThread()
<br>> run_process.start()<br>><br>> but how do i kill it ? This part is not in my book. Basically the thread<br>> works, and runs in a while loop. Is there a way to destroy the instance<br>> of it after creation ?
<br><br>A thread dies when it's run() method exits, so you have to contrive a<br>way to make run() exit. The usual way is to set a flag that the thread<br>checks. Here is an example using a threading.Event as a flag:<br>
<a href="http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/65448">http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/65448</a><br><br>Kent<br><br></blockquote></div><br>