title: Rails 4 : Execute code after thread execution
body: <p>I have a <code>Thread.new {}</code> which calls a system program, and I want the view (it's a <code>responds_to</code> in JSON) to be returned to the user <strong>after</strong> the thread is terminated, but I don't want to have the entire website blocked, waiting the program to finish.</p>
  
  <p>Any ideas to do that ?</p>