[issue14976] Queue.PriorityQueue() is not interrupt safe

2012-06-01 Thread Johan Aires Rastén
Johan Aires Rastén added the comment: I did read some more on the subject and it seems like using locks with interrupts is in general a very difficult problem and not limited to Python. Don't know if this is considered common knowledge among programmers or if it would be useful with at least

[issue14976] Queue.PriorityQueue() is not interrupt safe

2012-06-01 Thread Richard Oudkerk
Richard Oudkerk added the comment: I don't think there is anything special about PriorityQueue. There is a similar concerning the use of the Python implementation of RLock in signal handlers -- see http://bugs.python.org/issue13697. Maybe the signal handler should temporarily mask or ignore S

[issue14976] Queue.PriorityQueue() is not interrupt safe

2012-06-01 Thread Johan Aires Rastén
Johan Aires Rastén added the comment: Start queue_deadlock.py in one terminal and note the PID it prints. Compile queue_sendint.c in another terminal and execute it with previous PID as only argument. If the bug is triggered, nothing will print in the python terminal window when you press En

[issue14976] Queue.PriorityQueue() is not interrupt safe

2012-06-01 Thread Johan Aires Rastén
Changes by Johan Aires Rastén : Added file: http://bugs.python.org/file25787/queue_sendint.c ___ Python tracker ___ ___ Python-bugs-list maili

[issue14976] Queue.PriorityQueue() is not interrupt safe

2012-06-01 Thread Johan Aires Rastén
Changes by Johan Aires Rastén : Added file: http://bugs.python.org/file25786/queue_deadlock.py ___ Python tracker ___ ___ Python-bugs-list mai

[issue14976] Queue.PriorityQueue() is not interrupt safe

2012-06-01 Thread Johan Aires Rastén
New submission from Johan Aires Rastén : Python 2.7.3 (default, Apr 20 2012, 22:39:59) [GCC 4.6.3] on linux2 If a signal handler calls Queue.PriorityQueue.put and a second signal is received while one is already being processed, neither of the calls to put will terminate. Highly dependent on