lib/msgpack/rpc/loop.rb in msgpack-rpc-0.4.5 vs lib/msgpack/rpc/loop.rb in msgpack-rpc-0.5.0
- old
+ new
@@ -17,17 +17,17 @@
#
module MessagePack
module RPC
-Loop = Rev::Loop
+Loop = Cool.io::Loop
module LoopUtil
attr_reader :loop
- class Timer < Rev::TimerWatcher
+ class Timer < Cool.io::TimerWatcher
def initialize(interval, repeating, &block)
@block = block
super(interval, repeating)
end
def on_timer
@@ -37,11 +37,11 @@
def start_timer(interval, repeating, &block)
@loop.attach Timer.new(interval, repeating, &block)
end
- class TaskQueue < Rev::AsyncWatcher
+ class TaskQueue < Cool.io::AsyncWatcher
def initialize
@queue = []
super
end
@@ -75,10 +75,10 @@
def stop
@queue.detach if @queue && @queue.attached?
@loop.stop
# attach dummy timer
- @loop.attach Rev::TimerWatcher.new(0, false)
+ @loop.attach Cool.io::TimerWatcher.new(0, false)
nil
end
end