Someone wrote in [info]jerith,
Timeout.timeout accepts the exception class as the second parameter. I simply created a BenignTimeout class whose parent is StandardError.
Timeout.timeout(10, BenignTimeout) { do_something } rescue false


Advertisement


(Read 13 comments)

Post a comment in response:

From:
Help
Identity URL: 
Username:
Password:
Don't have an account? Create one now.
Subject:
No HTML allowed in subject
   Help
Message:
 
Create an Account
Forgot your login or password?
Login w/ OpenID
English • Español • Deutsch • Русский…