2019年12月15日

线程

摘要: 一.线程与进程的区别 线程是一串指令集 进程是指令集的集合,即是多个线程组成的 二.全局锁 Python不能利用多核,到达并行。但当线程之间是io密集型可以通过切换到达效果。 三.实例一(以类方法写) 1 import threading 2 import time 3 class mythread 阅读全文

posted @ 2019-12-15 23:31 居一雪 阅读(172) 评论(0) 推荐(1) 编辑

导航