Author kormang
Recipients kormang
Date 2021-04-11.11:52:50
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1618141970.93.0.19986621438.issue43805@roundup.psfhosted.org>
In-reply-to
Content
When child process dies unexpectedly Queue.get waits indefinitely.

Here is example:

import os
import signal
import multiprocessing

def child_func(qa, qb):
    input = qa.get()
    print('Child received: ', input)
    os.kill(os.getpid(), signal.SIGTERM)
    qb.put('B')
    exit(0)

qa = multiprocessing.Queue()
qb = multiprocessing.Queue()
process = multiprocessing.Process(target=child_func, args=(qa, qb))
process.start()

qa.put('A')
try:
    input = qb.get()
    print('Parent received: ', input)
except Exception as ex:
    print(ex)
process.join()
exit(0)
History
Date User Action Args
2021-04-11 11:52:50kormangsetrecipients: + kormang
2021-04-11 11:52:50kormangsetmessageid: <1618141970.93.0.19986621438.issue43805@roundup.psfhosted.org>
2021-04-11 11:52:50kormanglinkissue43805 messages
2021-04-11 11:52:50kormangcreate