[issue40399] Program hangs if process created right after adding object to a Queue

2020-04-28 Thread Delgan
Delgan added the comment: Another curiosity: if 'print("Consumed:", queue.get())' is replaced by either 'print("Consumed")' or 'queue.get()', then the program keeps running without stopping. Only a combination of both makes the program to hang. Also reproducible on 3.5.2. -- __

[issue40399] Program hangs if process created right after adding object to a Queue

2020-04-28 Thread Delgan
Delgan 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)

[issue40399] Program hangs if process created right after adding object to a Queue

2020-04-26 Thread Delgan
New submission from Delgan : Hi. I have a very basic program: - one multiprocessing SimpleQueue - one consumer thread - one loop: - add one item to the queue - create a new process with itself add one item to the queue - wait for the process to end For some unknown reason, it will hangs