threads and sockets

Diez B. Roggisch deetsNOSPAM at web.de
Wed Oct 13 08:27:26 EDT 2004


Ajay wrote:

> how can i stop a server socket running in a thread other than the main
> thread? if the server socket was a local variable of the function started
> by the child thread, would calling join work?

Short answer: you can't, and join won't help. Use select on sockets, with a
timeout, or use twisted.


-- 
Regards,

Diez B. Roggisch



More information about the Python-list mailing list