Build Safer Ruby Daemons with RobustThread

July 6, 2009
By Ric Roberts at Ruby Inside
Build Safer Ruby Daemons with RobustThread

When running a Ruby daemon which executes code in a loop, if the process is killed while something is happening then problems can occur if the code doesn't handle all the exceptions properly or if the loop isn't broken cleanly. RobustThread is a Ruby class by Jared Kuolt for the creation of threads, which helps to alleviate this problem. RobustThread lets you set up loggers, exception handlers and callbacks for threads, exposing the actual thread via an attribute.  By default, it logs to…
Read more »

Tags:

    blog comments powered by Disqus