re bug

Alex Martelli aleaxit at
Tue Oct 5 11:08:36 CEST 2004

Klaus Neuner <klaus_neuner82 at> wrote:
> Is there perhaps a way to tell Python something like 
> "Try the search for 5 minutes. If you don't find anything, continue."

You could spawn a watchdog thread that will raise an exception in the
main thread 300 seconds from now (unless previously annulled).  If that
doesn't work (because the main thread is deep into some operation which
doesn't let it see exceptions) you could spawn a separate process for
the job and kill that process if it hasn't emitted results within 300
seconds.  Not _good_ solutions but maybe better than nothing...


More information about the Python-list mailing list