If I create and start a thread without keeping a reference to the thread, when is the thread garbage collected?

What I would like is for the thread to run to completion, then be GCed. I can't find anything in the docs that specifies this behavior; nor can I think of any other behaviour that seems reasonable :-)

For example with this code:

def genpassenger(num):
    for i in range(num):
        passenger().start()

class passenger(threading.Thread):
        def run:
            #do something

will all the passenger threads run to completion, then be GCed?

Thanks,
Kent
--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to