Skip to content

Instantly share code, notes, and snippets.

@cheald
Created January 30, 2014 00:15
Show Gist options
  • Save cheald/8700041 to your computer and use it in GitHub Desktop.
Save cheald/8700041 to your computer and use it in GitHub Desktop.
f = Fiber.new {
begin
Timeout.timeout(1) {
p Fiber.yield("y1")
}
rescue Exception => e
puts e
end
}
p f.resume "resume 1"
sleep 1.5
p f.resume "resume 2"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment