Parent

Methods

Class/Module Index [+]

Quicksearch

EventMachine::Synchrony::FiberIterator

Public Instance Methods

each(foreach=nil, after=nil, &blk) click to toggle source

execute each iterator block within its own fiber and auto-advance the iterator after each call

# File lib/em-synchrony/fiber_iterator.rb, line 8
def each(foreach=nil, after=nil, &blk)
  fe = Proc.new do |obj, iter|
    Fiber.new { (foreach || blk).call(obj); iter.next }.resume
  end

  super(fe, after)
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.