Jun 6, 2012

Prevent slowness and fail gracefully

interruptingcow

from interruptingcow import timeout

with timeout(20.0, RuntimeError):
    run_something_that_might_take_long()

No comments: