摘要: 【source link:http://www.2cto.com/kf/201203/124801.html】一、 Python 中的线程使用: Python中使用线程有两种方式:函数或者用类来包装线程对象。1、 函数式:调用thread模块中的start_new_thread()函数来产生新线程。如下例: import time import thread def timer(no, interval): cnt = 0 while cnt<10: print 'Thread:(%d) Time:%s\n'%(no, time.ctime(... 阅读全文
posted @ 2012-08-15 22:46 semiok 阅读(9240) 评论(0) 推荐(0) 编辑