2006年03月17日 星期五 08:25
cry,您好! 可以用Event(事件)来控制,在创建子线程时传入一个事件,主线程进入等待状态,子线程捕捉异常后,唤醒主线程(正常结束,也要记的唤醒主线程),利用消息队列(生产者、消费者关系)来传递具体的出错信息。 ======= 2006-03-16 16:23:26 您在来信中写道:======= >python,您好! > >*******下面是转发的邮件***** > >From: cry >Email: zyqmail at tom.com > >python,您好! > >我做的一个程序中,会开几个子线程,现在遇到的问题是,如果子线程中发生异常,则线程没有任何信息显示,就退出了。如何才能让子线程中发生的异常信息,能象在主线程里那样,显示在控制台中呢? > >谢谢。 > > 致 >礼! > > cry > zyqmail at tom.com >*****转发内容结束***** > > > > 致 >礼! > > cry > zyqmail at tom.com > > >_______________________________________________ >python-chinese >Post: send python-chinese at lists.python.cn >Subscribe: send subscribe to python-chinese-request at lists.python.cn >Unsubscribe: send unsubscribe to python-chinese-request at lists.python.cn >Detail Info: http://python.cn/mailman/listinfo/python-chinese = = = = = = = = = = = = = = = = = = = = 致 礼! charles huang hyy at fjii.com TEL: 0591-3333169-212 2006-03-17
Zeuux © 2025
京ICP备05028076号