A beginner's question on thread
Timothy Wu
huggiepython at graffiti.idv.tw
Tue Apr 6 02:15:06 EDT 2004
I'm writing a small utility that listens for socket connections, and
also repond to user inputs via a text menu selection.
In order to respond to both the user and the incoming connections I
figure I need to use thread.
I think I would use the main thread to handle the menu and spawn a
thread which listens on a socket.
Now my question is, how do I terminate the server thread if user wants
to exit the application? If the server just sit there and listen the
thread would never terminate by itself. What kind of inter-thread
communications are available and where would I find info/tutorial on that?
Timothy
More information about the Python-list
mailing list