socket.accept()

marco marco.rossini at gmx.ch
Mon Feb 10 18:43:59 EST 2003


very much simplified a function looks like this:

def run():
  mysocket = socket.socket(blabla)
  mysocket.bind(blabla)
  mysocket.listen(1)
  while 1:
    newsocket, addr = mysocket.accept()
    # and so on...

now this loop is in a thread which, once started, will
never die. since a thread must (?) be killed at the
end of the program i do have a problem, because the
program just doesn't exit
how can i stopp the .accept()?

any help would be appreciated

->marco




More information about the Python-list mailing list