Python multiprocessing Queue failure

后端 未结 3 1130
旧时难觅i
旧时难觅i 2021-02-04 15:12

I create 100 child processes

proc_list = [
    Process(target = simulator, args=(result_queue,))
    for i in xrange(100)]

and start them

3条回答
  •  滥情空心
    2021-02-04 15:59

    The multiprocessing.Queue is said to be thread-safe in its documentations. But when you are doing inter-process communications with Queue, it should be used with multiprocessing.Manager().Queue()

提交回复
热议问题