# File lib/ramaze/snippets/fiber.rb, line 7 def initialize raise ArgumentError, 'new Fiber requires a block' unless block_given? @yield = Queue.new @resume = Queue.new @thread = Thread.new{ @yield.push [*yield(*wait)] } @thread.abort_on_exception = true @thread[:fiber] = self end