摘要: 一、Python中的线程使用: Python中使用线程有两种方式:函数或者用类来包装线程对象。1、 函数式:调用thread模块中的start_new_thread()函数来产生新线程。如下例: view plaincopy to clipboardprint?import time import thread def timer(no, interval): cnt = 0 while cnt<10: print 'Thread:(%d) Time:%s\n'%(no, time.ctime()) time.sleep(i... 阅读全文
posted @ 2012-12-07 14:37 出发一路向北 阅读(251) 评论(0) 推荐(0) 编辑