How to stop a listening socket.accept()?
donn at drizzle.com
Sat Mar 13 08:09:25 CET 2004
Quoth "kvdvm" <kvdvm at yahoo.com>:
| It seems that the accept() method acts as stubborn as a mule to get a
| connection request even if I close it in another thread.
| Any idea will be deeply appreciated.
Do you mean, the thread continues to block in accept? In this
case, you can use select with a timeout, or maybe your second
thread could just connect and send a special shut down message.
Donn Cave, donn at drizzle.com
More information about the Python-list