[issue40399] Program hangs if process created right after adding object to a Queue
Delgan
report at bugs.python.org
Tue Apr 28 04:33:23 EDT 2020
Delgan <delgan.py at gmail.com> added the comment:
I noticed the bug is reproducible even if the child process does not put object in the queue:
import multiprocessing
import threading
import time
if __name__ == "__main__":
queue = multiprocessing.SimpleQueue()
def consume(queue):
while True:
print("Consumed:", queue.get())
thread = threading.Thread(target=consume, args=(queue,))
thread.start()
for i in range(10000):
queue.put(i)
p = multiprocessing.Process(target=lambda: None)
p.start()
p.join()
print("Not hanging yet", i)
----------
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue40399>
_______________________________________
More information about the Python-bugs-list
mailing list