This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author szobov
Recipients davin, szobov
Date 2018-11-15.09:14:49
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1542273289.72.0.788709270274.issue35242@psf.upfronthosting.co.za>
In-reply-to
Content
I've decided to make the test more clean, so I added `time.sleep` and now we can be sure that here is enough time for queue's underlying process to synchronize all variables:
https://github.com/szobov/cpython/compare/master...regression-test-on-multiprocessing-queue-feeder-ignore-exception

It shows that sometimes `Queue._sem` will never be decreased.
https://github.com/szobov/cpython/blob/master/Lib/multiprocessing/queues.py#L266
If it's undesirable behavior, would it be better to ignore this lines: https://github.com/szobov/cpython/blob/master/Lib/multiprocessing/queues.py#L257-L259 ?

But in my thoughts the problem is in the functions `util._exit_function` and `util.is_exiting`. It's look like that `Queue._thread` share the same variable `util._exiting` with the process that started this thread. If you'll try to print it you see that when function `util._exit_function` executed for process it changes the value of `util._exiting` flag to `True` and after, from `Queue._thread`, the value for this flag stay `True`. But it's the daemon process and it should still work, isn't it? Or I'm missing something important here.
History
Date User Action Args
2018-11-15 09:14:49szobovsetrecipients: + szobov, davin
2018-11-15 09:14:49szobovsetmessageid: <1542273289.72.0.788709270274.issue35242@psf.upfronthosting.co.za>
2018-11-15 09:14:49szobovlinkissue35242 messages
2018-11-15 09:14:49szobovcreate