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.

Get the Android app

Or read this on Hacker News

Read more on:

Photo of ruby

ruby

Photo of Timeout

Timeout

Photo of Thread.raise

Thread.raise

Related news:

News photo

Things to avoid in Ruby

News photo

"Namespace on Read" for Ruby, FAQ

News photo

Show HN: PBT – A property-based testing library for Ruby