On Mon, 9 Mar 2009, Marco Mariani wrote:
> John O'Hagan wrote:
> > Is there a concise Pythonic way to write a method with a timeout?
>
> No need for threading. Just define a signal handler and call
> signal.alarm().
>
Thanks, that works well in general; but unfortunately the method in question 
(see the P.S. in my original post) starts a thread, and it's the thread that 
needs to timeout; unfortunately signal doesn't work in a thread. So I guess I 
need to rephrase my question as: how to timeout a thread?

Regards,

John


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

Reply via email to