2018年1月5日

摘要: from multiprocessing import Process, Pool import time, os def fun(n): time.sleep(1) print("当前的进程:", os.getpid()) n += 1000 def bar(args): print("回调函数,使用的主进程进行调用", os.getpid()) #... 阅读全文
posted @ 2018-01-05 11:51 努力的活着_在人间 阅读(126) 评论(0) 推荐(0)
摘要: from multiprocessing import Queue, Process import threading,os def con(process_queue): print("打印子进程id:",os.getpid()) process_queue.put("添加的数据") if __name__ == "__main__": # 主进程创建一个队列 ... 阅读全文
posted @ 2018-01-05 11:49 努力的活着_在人间 阅读(124) 评论(0) 推荐(0)

导航