Message231984
multiprocessing.Queue.empty() uses pipe polling on Windows. Unfortunately, pipe semantics on windows are different from POSIX.
The result is either:
- Hang when one process tries to get() and another checks for empty()
- Falsely returning empty() == False despite nothing being possible to get - because the other process is actually trying to read from the queue.
The attached testcase demonstrates the first case, with main process hard hanging on my Python 2.7.8 (anaconda), 32-bit on Windows 7 64-bit. Whether 1 or 2 happens depends on specific program flow.
Both can cause deadlocks in code that should be valid.
Note that get(block=False) actually works correctly.
It is possible that the problem is also present in Python 3. |
|
| Date |
User |
Action |
Args |
| 2014-12-02 10:09:33 | Radosław.Szkodziński | set | recipients:
+ Radosław.Szkodziński, tim.golden, zach.ware, steve.dower |
| 2014-12-02 10:09:33 | Radosław.Szkodziński | set | messageid: <1417514973.26.0.394264585481.issue22976@psf.upfronthosting.co.za> |
| 2014-12-02 10:09:33 | Radosław.Szkodziński | link | issue22976 messages |
| 2014-12-02 10:09:32 | Radosław.Szkodziński | create | |
|