New submission from Martin <martin.schroe...@nerdluecht.de>:
I experience a problem with multiprocessing and print. I tried to make a minimal working example, please see the attached file. WITHOUT the offending print statement in the queue filler thread, everything works: - pytest experiments/mp_problem.py - pytest experiments/mp_problem.py -s - python experiments/mp_problem.py WITH the offending print statement, not so much: - pytest experiments/mp_problem.py WORKS (Probably because pytest captures fd 1) - pytest experiments/mp_problem.py -s FAILS eventually (after a couple of workers have been started) - python experiments/mp_problem.py FAILS eventually (same). WITH the offending print statement AND PYTHONUNBUFFERED=1, everything works again: - pytest experiments/mp_problem.py - pytest experiments/mp_problem.py -s - python experiments/mp_problem.py Environment: Ubuntu 18.04.5 LTS python 3.8.5 (hcff3b4d_1) on conda 4.8.3 ---------- files: mp_problem.py messages: 375298 nosy: moi90 priority: normal severity: normal status: open title: print blocks with multiprocessing and buffered output type: behavior versions: Python 3.8 Added file: https://bugs.python.org/file49385/mp_problem.py _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue41539> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com