摘要:
from multiprocessing import Process, Pool import time def select(): time.sleep(1) print(time.ctime()) return '这是每个进行执行完后返回的值,该值会会被 callback函数接收' def f 阅读全文
摘要:
1. 多进程队列 , 只能实现数据交互,不能共享 from multiprocessing import Process,Queue import time import uuid class MyProcess(Process): def __init__(self,q): super(MyPro 阅读全文
摘要:
1. 进程的创建方式1 from multiprocessing import Process import time def func(thread_name): print(thread_name) time.sleep(2) if __name__ == '__main__': p = Pro 阅读全文