[Zope-Coders] Signal forwarding

Guido van Rossum guido@python.org
Thu, 10 Oct 2002 07:40:18 -0400


> >   CM> What would cause the method to not finish?  It's running in a
> >   CM> separate thread, no?  Is its execution held up as a result of
> >   CM> the signal?

> On Wed, 2002-10-09 at 21:59, Jeremy Hylton wrote:
> > It's just a question of luck.  What if the thread that holds the lock
> > is also the thread that runs the signal handler?  That thread can't
> > wait fot itself.

[ChrisM]
> The thread that handles the signal is always the main thread.  The main
> thread never handles any ZODB functions (its tied up in asyncore).

Chris, please stop trying to convince yourself that complex signal
handlers are okay.  It's already pretty much impossible to prove that
any multi-threaded application of any complexity is written correctly.
Add signals into the mix, and it's hopeless.

Also note that in the ZEO StorageServer, nearly all work is done in
the main thread.

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