diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/unicorn.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/unicorn.rb b/lib/unicorn.rb index 7fa8468..a696402 100644 --- a/lib/unicorn.rb +++ b/lib/unicorn.rb @@ -725,6 +725,10 @@ module Unicorn def build_app! if app.respond_to?(:arity) && app.arity == 0 + # exploit COW in case of preload_app. Also avoids race + # conditions in Rainbows! since load/require are not thread-safe + Unicorn.constants.each { |x| Unicorn.const_get(x) } + if defined?(Gem) && Gem.respond_to?(:refresh) logger.info "Refreshing Gem list" Gem.refresh |