Raymond Hettinger added the comment:

Guido opposes having us going down the path of using an RLock and altering the 
queue module to cope with reentrancy. 

In the case of mixing signals with threads, we all agree with Johan Aires 
Rastén that "using locks with interrupts is in general a very difficult problem 
and not limited to Python", nor is it even limited to the queue module.  

I believe that the usual technique for mixing signals and threads is to have 
the signal handler do the minimal work necessary to record the event without 
interacting with the rest of the program.  Later, another thread can act on the 
recorded signal but can do so with normal use of locks so that code invariants 
are not violated.  This design makes reasoning about the program more tractable.

----------
nosy: +davin
resolution:  -> wont fix
status: open -> closed

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue14976>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to