Message 367509 - Python tracker
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)