Get the latest tech news
Ruby's Timeout is dangerous and Thread.raise is terrifying (2015)
Why Ruby’s Timeout is dangerous (and Thread.raise is terrifying)
Timeout provides a way to auto-terminate a potentially long-running operation if it hasn’t finished in a fixed amount of time. Googling it finds me a series of StackOverflow discussions& forum posts about how it’s dangerous and should not be used, for the reasons we’ve learned about. Timeout provides a way to auto-terminate a potentially long-running operation if it hasn’t finished in a fixed amount of time.
Or read this on Hacker News