Why Ruby’s Timeout is dangerous (and Thread.raise is terrifying)
This is already documented in Timeout: Ruby’s most dangerous API. And normally I don’t like making blanket statements about language features. But I had a bad day at work because of this issue. So today, we’re talking about Timeout! :)
First! What is Timeout? Let’s say you have a bunch of code, that might be slow. A network request, a long computation, whatever. Ruby’s timeout documentation helpfully says
Timeout provides a way to auto-terminate a potentially long-running operation if it hasn’t...
Read more at jvns.ca