On 8/30/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > Hello, > > I am using the threading module and the Queue module in python to to > send out shipment tracking URL requests. > > Is there a way to timeout a thread within a Queue? > > I think the way I have it now the thread will wait until something is > returned and will basically wait forever for that something. > > Between the waiting for something to be returned and the timeouts on > the database connections, the program appears to just hang like it has > stopped working. Any suggestions? > > Here is a sample of code I am using (left out some of the code for > brevity): >
<code snipped> The two possible implementations: a) Use a timeout in your get() call to allow to check for thread termination b) push a sentinel object into the Queue that means "please exit now". -- http://mail.python.org/mailman/listinfo/python-list