[Python-Dev] Signals+Threads (PyGTK waking up 10x/sec).

Guido van Rossum guido at python.org
Tue Dec 11 01:10:34 CET 2007

On Dec 10, 2007 4:07 PM, Gustavo Carneiro <gjcarneiro at gmail.com> wrote:
> On 10/12/2007, Guido van Rossum <guido at python.org> wrote:
> > > Adam & I are now on #python-dev. Can you join?
> >
> > I think we successfully resolved this. Adam Olsen will produce a patch
> > that allows one to specify a single file descriptor to which a zero
> > byte will be written by the C-level signal handler. Twisted and PyGTK
> > will have to coordinate about this file descriptor. Glyph believes
> > this is possible and sufficient.
> Great that a solution was found at last.  But to be honest I don't
> understand why my patch (the second one) is not good.  Why is it preferable
> for libraries to provide their own file descriptor?

So the app is in charge of creating the pipe if it wants it.

We expect that if the pipe is always created, apps that assume only
fds 0, 1 and 2 are open may get confused or accidentally close it,

> Are people concerned about the overhead of always creating a pipe even it
> may not be used?  Always creating a pipe would at least avoid the need for
> any "coordination" between PyGTK and Twisted.

I don't think that anyone involved though the need for coordination
was an issue.

Please let this rest. We have a solution.

--Guido van Rossum (home page: http://www.python.org/~guido/)

More information about the Python-Dev mailing list