WARNING

You should not use long blocking operations (Net::HTTP or slow shell calls) with this as it
will prevent the EventMachine event loop from running and block all other requests.

Usage

Inside your Rack app #call(env):

Thin::AsyncResponse.perform(env) do |response|
response.status = 201
response.headers["X-Muffin-Mode"] = "ACTIVATED!"
response << "this is ... "
EM.add_timer(1) do
# This will be sent to the client 1 sec later without blocking other requests.
response << "async!"
response.done
end
end