class ActionDispatch::Executor

def call(env)

def call(env)
  state = @executor.run!(reset: true)
  begin
    response = @app.call(env)
    returned = response << ::Rack::BodyProxy.new(response.pop) { state.complete! }
  rescue => error
    @executor.error_reporter.report(error, handled: false, source: "application.action_dispatch")
    raise
  ensure
    state.complete! unless returned
  end
end

def initialize(app, executor)

def initialize(app, executor)
  @app, @executor = app, executor
end