title: async requests using sinatra streaming API
body: <p>I use <code>async_sinatra</code> gem to implement asynchronous routes, but I came across a post somewhere that said that Sinatra's streaming API can be used instead of <code>async_sinatra</code> for this purpose. Can the same functionality as below be implemented using streaming?</p>
  
  <pre><code>require 'em-hiredis'
  require 'sinatra/async'
  
  class App &lt; Sinatra::Base
    register Sinatra::Async
  
    def redis
      @redis ||= EM::Hiredis.connect
    end
  
    aget '/' do
      redis.blpop('abcdef', 15).
        callback {|x| body "x=#{x}"}.
        errback {|e| body "e=#{e}"}
    end
  
    run! if app_file == $0
  end
  </code></pre>