diff options
author | Eric Wong <normalperson@yhbt.net> | 2009-10-17 22:42:56 -0700 |
---|---|---|
committer | Eric Wong <normalperson@yhbt.net> | 2009-10-17 22:42:56 -0700 |
commit | a764983fccd6cce64043d76e09a5e1718e7f8fd6 (patch) | |
tree | cd6f730c5b93c584a7cdda57079b318d99bb3120 /lib/rainbows.rb | |
parent | 71a1cf90ce16ce6951f1ce76fcea98b13bc54576 (diff) | |
download | rainbows-a764983fccd6cce64043d76e09a5e1718e7f8fd6.tar.gz |
We use the "G" global constant from the Rev model everywhere to simplify things a little. Test cases are more consistent now, too.
Diffstat (limited to 'lib/rainbows.rb')
-rw-r--r-- | lib/rainbows.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/rainbows.rb b/lib/rainbows.rb index 7978288..096f700 100644 --- a/lib/rainbows.rb +++ b/lib/rainbows.rb @@ -3,6 +3,12 @@ require 'unicorn' module Rainbows + # global vars because class/instance variables are confusing me :< + # this struct is only accessed inside workers and thus private to each + G = Struct.new(:cur, :max, :logger, :alive, :app).new + # G.cur may not be used the network concurrency model + G.alive = true + require 'rainbows/const' require 'rainbows/http_server' require 'rainbows/http_response' |