Created
November 3, 2011 05:30
-
-
Save takai/1335840 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'eventmachine' | |
require 'ruote/worker' | |
module Ruote | |
class EMWorker < Worker | |
def run | |
EM.add_periodic_timer(1) do | |
step | |
end | |
end | |
def run_in_thread | |
raise NotImplementedError, 'EMWorker#run_in_thread' | |
end | |
def shutdown | |
EM.stop | |
end | |
def take_a_rest(msgs_processed) | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment