Permalink
Browse files

update timers thingy

  • Loading branch information...
1 parent 8850db3 commit 82d67a84574e4fcfc698ba1353a2fe72201aa3e7 @gnufied committed Sep 3, 2008
Showing with 11 additions and 12 deletions.
  1. +10 −10 lib/packet/packet_core.rb
  2. +1 −0 lib/packet/packet_master.rb
  3. +0 −2 worker/no_proxy_worker.rb
View
20 lib/packet/packet_core.rb
@@ -286,16 +286,16 @@ def unix?
end
def check_for_timer_events
-# @timer_hash.delete_if do |key,timer|
-# if timer.cancel_flag
-# true
-# elsif timer.run_now?
-# timer.run
-# (timer.respond_to?(:interval)) ? false : true
-# else
-# false
-# end
-# end
+ # @timer_hash.delete_if do |key,timer|
+ # if timer.cancel_flag
+ # true
+ # elsif timer.run_now?
+ # timer.run
+ # (timer.respond_to?(:interval)) ? false : true
+ # else
+ # false
+ # end
+ # end
ready_timers = @timer_hash.collect { |key,timer| timer if timer.run_now? }.compact
ready_timers.each { |timer| timer.run }
View
1 lib/packet/packet_master.rb
@@ -106,6 +106,7 @@ def fork_and_load(worker_klass,worker_options = { })
if(!(pid = fork))
[master_write_end,master_read_end].each { |x| x.close }
[worker_read_end,worker_write_end].each { |x| enable_nonblock(x) }
+
exec form_cmd_line(worker_read_end.fileno,worker_write_end.fileno,t_worker_name,option_dump_length)
end
Process.detach(pid)
View
2 worker/no_proxy_worker.rb
@@ -3,8 +3,6 @@ class NoProxyWorker < Packet::Worker
#set_no_auto_load(true)
def worker_init
p "Starting no proxy worker"
- a = HelloWorld.new
- puts a.say_hello
end
def receive_data data_obj

0 comments on commit 82d67a8

Please sign in to comment.