Skip to content

Instantly share code, notes, and snippets.

@raphael
Created March 1, 2009 05:52
Show Gist options
  • Save raphael/72232 to your computer and use it in GitHub Desktop.
Save raphael/72232 to your computer and use it in GitHub Desktop.
require 'rubygems'
require 'eventmachine'
module MyHandler
def notify_readable
puts "YYYEEEEEEHAAAA"
end
end
r,w = IO.pipe
w.write("123")
EM.run do
EM.attach(r, MyHandler)
EM.run
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment