摘要:
1.使用threading模块 #coding=utf-8 import threading import time def saySorry(): print("亲爱的,我错了,我能吃饭了吗?") time.sleep(1) if __name__ == "__main__": for i in 阅读全文
摘要:
1.调度算法 时间片轮转 优先级调度 2.并发和并行 并发:进程的数量对于CPU,CPU通过快速切换来处理多进程问题 并行:有足够的CPU来处理多进程问题 3.子进程的创建 需要导入Process包中的multiprocessing模块 #coding=utf-8 from multiprocess 阅读全文