lib/rbuv.rb in rbuv-0.0.2 vs lib/rbuv.rb in rbuv-0.0.3
- old
+ new
@@ -1,27 +1,30 @@
require 'rbuv/rbuv'
require 'rbuv/version'
require 'rbuv/timer'
+require 'rbuv/signal'
module Rbuv
- def self.run_loop
- Loop.run
- end
+ class << self
- def self.stop_loop
- Loop.stop
- end
+ def run_loop
+ Loop.run
+ end
- def self.run
- Timer.start 0, 0 do
- yield
+ def stop_loop
+ Loop.stop
end
- self.run_loop
- end
- def self.run_block
- Timer.start 0, 0 do
- yield
+ alias stop stop_loop
+
+ def run
+ Timer.start(0, 0) { yield }
+ self.run_loop
end
- Loop.run_once
+
+ def run_block
+ Timer.start(0, 0) { yield }
+ Loop.run_once
+ end
+
end
end