Skip to content

@mattn /fiber.rb
Last active

Embed URL

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
class Fiber
include Enumerable
def each
begin
loop { yield self.resume }
rescue FiberError
end
end
end
puts Fiber.new {
Fiber.yield 3
Fiber.yield 2
Fiber.yield 1
Fiber.yield 0
}.to_enum.to_a
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.