Spawn a new thread to serve up the controller in. This is to get around
the fact that Rack isn’t based around IOs and
we need to use a thread to stream data from the response bodies. Nobody
should call this method except in Rails
internals. Seriously!
# File actionpack/lib/action_controller/metal/live.rb, line 281
def new_controller_thread # :nodoc:
Thread.new {
t2 = Thread.current
t2.abort_on_exception = true
yield
}
end