2016年8月26日

摘要: 非阻塞 q.put(item) 写入队列,timeout等待时间 q.put_nowait(item) 相当q.put(item, False) threads多线程 首先导入threading 模块,这是使用多线程的前提 appent 把每个线程放在threads列表里 start 开始 join 阅读全文
posted @ 2016-08-26 21:21 wild-mushrooms 阅读(676) 评论(0) 推荐(0) 编辑
 
摘要: sys:使用sys模块获得脚本的参数 queue模块,创建一个“队列”对象 time 模块 Python time time() 返回当前时间的时间戳(1970纪元后经过的浮点秒数)。 find()函数找不到时返回为-1 #!/usr/bin/env python# -*- coding: utf- 阅读全文
posted @ 2016-08-26 19:49 wild-mushrooms 阅读(1155) 评论(0) 推荐(0) 编辑