2007年09月02日 星期日 18:56
请问如何停止进程? thread.start_new_thread和继承threading.Thread这两种创建进程的方法应如何结束进程? 谢谢 vsmb 2007-09-02
2007年09月02日 星期日 19:49
On 9/2/07, vsmb <vsmb在21cn.com> wrote: > 请问如何停止进程? > thread.start_new_thread和继承threading.Thread这两种创建进程的方法应如何结束进程? > 谢谢 > 不能强制停,一般是通过一个全局的变量,通过不断地检测这个值来决定是否要退出。 -- I like python! UliPad <>: http://code.google.com/p/ulipad/ My Blog: http://www.donews.net/limodou
2007年09月02日 星期日 20:13
你这是线程。 在 07-9-2,vsmb<vsmb at 21cn.com> 写道: > 请问如何停止进程? > thread.start_new_thread 和继承 threading.Thread 这两种创建进程的方法应如何结束进程? > 谢谢 >
2007年09月03日 星期一 10:51
def stop(self):
raise SystemExit
return
ÕâÑùд£¬ºÃÏñÒ²¿ÉÒÔ£¬²»¹ýÎÒÖ»ÔÚlinuxÏÂÊÔ¹ý¡£
ÔÚ07-9-2£¬Jiahua Huang <jhuangjiahua在gmail.com> дµÀ£º
>
> ÄãÕâÊÇÏ̡߳£
>
> ÔÚ 07-9-2£¬vsmb<vsmb在21cn.com> дµÀ£º
> > ÇëÎÊÈçºÎÍ£Ö¹½ø³Ì£¿
> > thread.start_new_thread ºÍ¼Ì³Ð threading.Thread ÕâÁ½ÖÖ´´½¨½ø³ÌµÄ·½·¨Ó¦ÈçºÎ½áÊø½ø³Ì£¿
> > лл
> >
> _______________________________________________
> python-chinese
> Post: send python-chinese在lists.python.cn
> Subscribe: send subscribe to python-chinese-request在lists.python.cn
> Unsubscribe: send unsubscribe to python-chinese-request在lists.python.cn
> Detail Info: http://python.cn/mailman/listinfo/python-chinese
--
DJ
-------------- 下一部分 --------------
Ò»¸öHTML¸½¼þ±»ÒƳý...
URL: http://python.cn/pipermail/python-chinese/attachments/20070903/4efab4c9/attachment.html
Zeuux © 2025
京ICP备05028076号