Guest User

Untitled

a guest
May 25th, 2018
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.20 KB | None | 0 0
  1. require 'rubygems'
  2. require 'eventmachine'
  3.  
  4. $ch = EM::Channel.new
  5.  
  6. Thread.new do
  7. $ch.subscribe do |msg|
  8. puts "Got #{msg}"
  9. end
  10.  
  11. EM.run
  12. end
  13.  
  14. loop do
  15. $ch.push(:kikoo)
  16. sleep 1
  17. end
Add Comment
Please, Sign In to add comment