Use ruby Timeout class as background thread
- by turri
I found ruby class Timeout very useful for my project.
But i need to run a block of code in background and keep it under a timeout..
For example
Timeout::timeout(2) { block.call }
How to do that?