Typically I do something like:
q = Queue()
p = Process(target=f, args=(q,))
p.start()
Is there some way to pass p another Queue? Er... now that I think about it - can this be done through q?
q
. You can pass any object there, another Queue
included No, once a process has been created (the process is forked), queues can no longer be sent to it. They can only be sent at process creation time. To do otherwise results in an exception.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.