摘要: Python中使用线程有两种方式:函数或者用类来包装线程对象。1、 函数式:调用thread模块中的start_new_thread()函数来产生新线程。如下例:import thread def timer(no, interval): cnt = 0 while cnt<... 阅读全文
posted @ 2013-08-05 16:34 jianhong 阅读(183) 评论(0) 推荐(0)
摘要: Python中使用线程有两种方式:函数或者用类来包装线程对象。1、 函数式:调用thread模块中的start_new_thread()函数来产生新线程。如下例:import thread def timer(no, interval): cnt = 0 while cnt<... 阅读全文
posted @ 2013-08-05 16:34 jianhong 阅读(185) 评论(0) 推荐(0)