Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master
Fetching contributors…

Cannot retrieve contributors at this time

executable file 17 lines (11 sloc) 0.336 kb
#!/usr/bin/env ruby
# If we link a method to a dead fiber, it should be called immediately
$:.unshift File.join(File.dirname(__FILE__), "..", "lib")
require 'eventless'
def say_goodbye(fiber)
puts "goodbye!"
end
f = Eventless.spawn { puts "in the fiber" }
f.join
f.link(self, :say_goodbye)
sleep 0 # yield back to the event loop
Jump to Line
Something went wrong with that request. Please try again.