Devoloping socket applications with IDLE
Itamar Shtull-Trauring
itamar at itamarst.org_NOSPAM
Mon Aug 26 14:33:46 EDT 2002
Greg Copeland wrote:
> If you're going to insist on using signals with threads, you should
> have a single thread catch all signals. The catching thread should
> then notify all other threads of the signal arrival.
Actually, the main thread always gets signals in Python:
"""
Any thread can perform an alarm(), getsignal(), or pause(); only the main
thread can set a new signal handler, and the main thread will be the only
one to receive signals (this is enforced by the Python signal module, even
if the underlying thread implementation supports sending signals to
individual threads).
"""
(from http://www.python.org/doc/current/lib/module-signal.html)
--
Itamar Shtull-Trauring http://itamarst.org/
Available for Python, Twisted, Zope and Java consulting
More information about the Python-list
mailing list