摘要: 尼码,今天在琢磨这个模块的使用。不知道为啥不稳定,在某个站点上看得视频教程,误人子弟啊。完全坑爹。贴下代码,这是不好的事例。回头找下最优的线程方案。#!/usr/bin/python#coding:utf8import timeimport threaddef t1(name,x,l): for i in xrange(x): print i,name l.release()lock=thread.allocate_lock()lock.acquire()thread.start_new_thread(t1,('aaa',10,lock))thread.start_n... 阅读全文
posted @ 2014-02-24 16:25 墨迹哥's 阅读(432) 评论(0) 推荐(0)