diff options
Diffstat (limited to 'activerecord/lib/active_record')
3 files changed, 7 insertions, 7 deletions
diff --git a/activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb b/activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb index 7cbf01ec65..06b9bc5765 100644 --- a/activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb +++ b/activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb @@ -334,7 +334,7 @@ module ActiveRecord end def connection_pools - @connection_pools[$$] + @connection_pools[Process.pid] end def establish_connection(name, spec) @@ -409,20 +409,20 @@ module ActiveRecord private def class_to_pool - @class_to_pool[$$] + @class_to_pool[Process.pid] end def set_pool_for_spec(spec, pool) - @connection_pools[$$][spec] = pool + @connection_pools[Process.pid][spec] = pool end def set_class_to_pool(name, pool) - @class_to_pool[$$][name] = pool + @class_to_pool[Process.pid][name] = pool pool end def get_pool_for_class(klass) - @class_to_pool[$$].fetch(klass) { + @class_to_pool[Process.pid].fetch(klass) { c_to_p = @class_to_pool.values.find { |class_to_pool| class_to_pool[klass] } diff --git a/activerecord/lib/active_record/connection_adapters/mysql_adapter.rb b/activerecord/lib/active_record/connection_adapters/mysql_adapter.rb index 5905242747..724dbff1f0 100644 --- a/activerecord/lib/active_record/connection_adapters/mysql_adapter.rb +++ b/activerecord/lib/active_record/connection_adapters/mysql_adapter.rb @@ -119,7 +119,7 @@ module ActiveRecord private def cache - @cache[$$] + @cache[Process.pid] end end diff --git a/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb b/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb index 7414d38aea..d04f04b201 100644 --- a/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb +++ b/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb @@ -359,7 +359,7 @@ module ActiveRecord private def cache - @cache[$$] + @cache[Process.pid] end def dealloc(key) |