aboutsummaryrefslogtreecommitdiffstats
path: root/railties
diff options
context:
space:
mode:
authorMatthew Draper <matthew@trebex.net>2015-07-20 08:09:21 +0930
committerMatthew Draper <matthew@trebex.net>2015-07-20 09:14:10 +0930
commitbd31aec9c33453e0ba96aec614e56958784e6b8d (patch)
tree58cdcf70d61a52bd4df139c8cefbdebe3bd06621 /railties
parent6ffec3c16c0ee0b0ab4643907af1f2ed80a71a9a (diff)
downloadrails-bd31aec9c33453e0ba96aec614e56958784e6b8d.tar.gz
rails-bd31aec9c33453e0ba96aec614e56958784e6b8d.tar.bz2
rails-bd31aec9c33453e0ba96aec614e56958784e6b8d.zip
We need stricter locking before we can unload
Specifically, the "loose upgrades" behaviour that allows us to obtain an exclusive right to load things while other requests are in progress (but waiting on the exclusive lock for themselves) prevents us from treating load & unload interchangeably: new things appearing is fine, but they do *not* expect previously-present constants to vanish. We can still use loose upgrades for unloading -- once someone has decided to unload, they don't really care if someone else gets there first -- it just needs to be tracked separately.
Diffstat (limited to 'railties')
-rw-r--r--railties/lib/rails/application/finisher.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/railties/lib/rails/application/finisher.rb b/railties/lib/rails/application/finisher.rb
index f8f92792a7..404e3c3e23 100644
--- a/railties/lib/rails/application/finisher.rb
+++ b/railties/lib/rails/application/finisher.rb
@@ -86,7 +86,7 @@ module Rails
# added in the hook are taken into account.
initializer :set_clear_dependencies_hook, group: :all do
callback = lambda do
- ActiveSupport::Dependencies.interlock.attempt_loading do
+ ActiveSupport::Dependencies.interlock.attempt_unloading do
ActiveSupport::DescendantsTracker.clear
ActiveSupport::Dependencies.clear
end