Method: Rack::App::Streamer#each

Defined in:
lib/rack/app/streamer.rb

#each(&front) ⇒ Object



30
31
32
33
34
35
36
37
38
39
40
# File 'lib/rack/app/streamer.rb', line 30

def each(&front)
  @front = front
  @scheduler.defer do
    begin
      @back.call(self)
    rescue Exception => ex
      @scheduler.schedule { raise(ex) }
    end
    close unless @keep_open
  end
end