Another socket/thread question

Ken khirmint at hotmail.com
Wed Mar 13 13:37:29 EST 2002


Hey everyone..

I've got a thread that continously listens to a socket, and reports what it
receives. Blocking is turned on, and I would like it to stay that way since
the only thing the thread has to do, is listen to the socket.

My question is when the socket needs to be closed (program shuts down, or
that user is being disconnected by the server) is it possible to interupt a
socket.recv ()?

If not, whats the easiest way to cut processor time from looping endlessly
with blocking turned off?

Thanks in advance.





More information about the Python-list mailing list