I have been having trouble with the garbage collector and sockets.
Unfortunately, google keeps telling me that the problem is the garbage
collector ignoring dead (closed?) sockets instead of removing live
ones.  My problem is


        x.sock=socket.socket(socket.AF_INET,socket.SOCK_STREAM)
        do_stuff(x.sock)


def do_stuff(sock):
        sock_list.append(sock)


once do_stuff finishes, x.sock disappears, and I can only believe it
is being garbage collected.  I'd like to hear the standard means for
avoiding this issue (gc appears to have only the interface to declare
something garbage, not to declare something not garbage).

Scott Robinson

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to