Timeout on a function call

You may use the signal package if you are running on UNIX: 10 seconds after the call signal.alarm(10), the handler is called. This raises an exception that you can intercept from the regular Python code. This module doesn’t play well with threads (but then, who does?) Note that since we raise an exception when timeout happens, it may end … Read more