摘要:
一:协程 概念: 协程: 1)并发:JMeter并发100个请求。 2)并行:2个进程分别在2个cpu上并行运行 3)同步:IO操作,耗时,等待操作完毕 4)异步:不等待操作完毕 5)并发是实现异步 实现异步(并发)的方法有:多线程、协程 (1)多线程:CPU调度多个线程 (由内核决定的) (2)协 阅读全文
posted @ 2021-04-05 15:28
1142783691
阅读(105)
评论(0)
推荐(0)
摘要:
一。线程:threading 1)多线程 import threadingimport timedef music(user): print(f'{user} 正在运行函数1') time.sleep(5) print(f'{threading.current_thread().name} 函数1即 阅读全文
posted @ 2021-04-05 15:04
1142783691
阅读(257)
评论(0)
推荐(0)

浙公网安备 33010602011771号