class ActionView::StreamingFlow

:nodoc:

def append!(key, value)

if that's the key it's waiting for.
by providing and resuming back to the fiber,
Appends the contents for the given key. This is called
def append!(key, value)
  super
  @fiber.resume if @waiting_for == key
end

def get(key)

then it will begin waiting for the given key and yield.
is not available and we're inside the layout fiber,
Try to get stored content. If the content
def get(key)
  return super if @content.key?(key)
  if inside_fiber?
    view = @view
    begin
      @waiting_for = key
      view.output_buffer, @parent = @child, view.output_buffer
      Fiber.yield
    ensure
      @waiting_for = nil
      view.output_buffer, @child = @parent, view.output_buffer
    end
  end
  super
end

def initialize(view, fiber)

:nodoc:
def initialize(view, fiber)
  @view    = view
  @parent  = nil
  @child   = view.output_buffer
  @content = view.view_flow.content
  @fiber   = fiber
  @root    = Fiber.current.object_id
end

def inside_fiber?

def inside_fiber?
  Fiber.current.object_id != @root
end