Clean-up of threaded server

Aahz Maruch aahz at panix.com
Tue Apr 10 11:02:46 EDT 2001


In article <3AD1D149.DBAFA7AF at stroeder.com>,
Michael =?iso-8859-1?Q?Str=F6der?=  <michael at stroeder.com> wrote:
>
>2. For testing purposes the server process can be started
>non-detached. In this case KeyboardInterrupt is catched by the main
>thread to shut down the process. This does not work with the helper
>thread but works without it.

You'll need to catch the KeyboardInterrupt and separately (in Python
code) send a value to the helper thread to tell it to clean itself up.

>Does anybody have a clue how to solve this? Any thread tutorials for
>Python?

http://starship.python.net/crew/aahz/
-- 
                      --- Aahz  <*>  (Copyright 2001 by aahz at pobox.com)

Androgynous poly kinky vanilla queer het Pythonista   http://www.rahul.net/aahz/
Hugs and backrubs -- I break Rule 6

Why is this newsgroup different from all other newsgroups?



More information about the Python-list mailing list