threads check socket
gagsl-py2 at yahoo.com.ar
Fri Jul 31 19:23:02 CEST 2009
En Fri, 31 Jul 2009 13:35:10 -0300, NighterNet <darkneter at gmail.com>
> I been trying to find a way to check the socket is open or not. The
> thread are in a group and loop if the sockets are open. If they are
> not open delete the thread and remove the group. I need on this.
What means an "open socket"? Do you want to detect whether the other side
closed the connection? In that case reading from the socket returns an
Regarding the "threads in a group", I don't understand what you mean. But
in general, you don't delete a thread, you just return from its run()
method and the thread finishes execution.
More information about the Python-list