I\'d like to have some cleanup code run when Rails is shutting down - is that possible? My situation is that I have a few threads in the background (I\'m using jruby and ca
Probably should just use the Ruby exit handler, which is a Kernel method:
$ irb >> at_exit do ?> puts 'bye...' >> end => # >> exit bye... $