摘要: python的线程是用thread和threading来实现的。其中利用threading会更好,因为thread没有线程保护,当主线程退出了之后,子线程也会被强行退出。threading支持守护线程。 thread中常用的方法:thread.allocate_lock() 是返回一个新的锁定... 阅读全文
posted @ 2015-06-15 12:56 xiaoli2018 阅读(172) 评论(0) 推荐(0) 编辑