2020年2月28日
摘要: 在一个进程中 开三个子进程(不只单纯使用一个CPU) import multiprocessing import time def mult(name): time.sleep(1) print('hello',name,time.ctime()) if __name__ == '__main__' 阅读全文
posted @ 2020-02-28 16:29 -脑子坏了- 阅读(145) 评论(0) 推荐(0) 编辑
摘要: 先进先出 import queue q =queue.Queue() #FIFO q.put(12) q.put('hello') q.put({"name":"yuan"}) print(q.qsize()) print(q.full()) print(q.empty()) while True: 阅读全文
posted @ 2020-02-28 12:38 -脑子坏了- 阅读(135) 评论(0) 推荐(0) 编辑