from multiprocessing import Process
# c is a container
p = Process(target = f, args = (c,))
p.start()
I assume a deep copy of c
is passed to function f
because shallow copy would make no sense in the case of a new process (the new process doesn't have access to the data from the calling process).
But how is this deep copy defined? There is a whole set of notes in the copy.deepcopy()
documentation, do all these notes apply here as well? The multiprocessing
documentation says nothing...
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…