Deadlock with big object in multiprocessing.Queue
问题 When you supply a large-enough object into multiprocessing.Queue , the program seems to hang at weird places. Consider this minimal example: import multiprocessing def dump_dict(queue, size): queue.put({x: x for x in range(size)}) print("Dump finished") if __name__ == '__main__': SIZE = int(1e5) queue = multiprocessing.Queue() process = multiprocessing.Process(target=dump_dict, args=(queue, SIZE)) print("Starting...") process.start() print("Joining...") process.join() print("Done") print(len