摘要: 池模块 线程池concurrent.futures.ThreadPoolExecutor from concurrent.futures import ThreadPoolExecutor from time import sleep tpool = ThreadPoolExecutor(max_w 阅读全文
posted @ 2018-10-04 16:25 小白的蟒蛇 阅读(149) 评论(0) 推荐(0) 编辑
摘要: 线程 Threading模块 使用和进程基本相似 多线程中是可以 的 在使用的过程中从用户层面上并没有感觉到和进程的差别,但是有本质差别 执行代码的最小单元 每一个进程至少有一个线程,这个线程是主线程 一个进程内的所有线程之间的数据是共享的 启动多线程 from threading import T 阅读全文
posted @ 2018-10-04 15:55 小白的蟒蛇 阅读(86) 评论(0) 推荐(0) 编辑