[Python-Dev] Signals, threads, blocking C functions

Anthony Baxter anthony at interlink.com.au
Mon Sep 4 09:19:39 CEST 2006

On Saturday 02 September 2006 22:10, Gustavo Carneiro wrote:
> According to [1], all python needs to do to avoid this problem is
> block all signals in all but the main thread; then we can guarantee
> signal handlers are always called from the main thread, and pygtk
> doesn't need a timeout.

>   But I would really prefer the first alternative, as it could be
> fixed within python 2.5; no need to wait for 2.6.

Assuming "the first alternative" is the "just block all signals in all but the 
main thread" option, there is absolutely no chance of this going into 2.5.

Signals and threads combined are an complete *nightmare* of platform-specific 
behaviour. I'm -1000 on trying to change this code now, _after_ the first 
release candidate. To say that "that path lies madness" is like 
saying "Pacific Ocean large, wet, full of fish". 

Anthony Baxter     <anthony at interlink.com.au>
It's never too late to have a happy childhood.

More information about the Python-Dev mailing list