diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2014-02-08 23:12:07 -0800 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2014-02-08 23:12:07 -0800 |
commit | e4dc3035ce881baf371a8445391c9ca393406290 (patch) | |
tree | 7b54662eaa631e0d51fa070f7aa4d6a920d97f3b /activerecord/lib/active_record/connection_adapters/abstract_adapter.rb | |
parent | f99b254e4e382ddd2cc86acff9ed80663b8c7817 (diff) | |
parent | 02a3c0e771b3e09173412f93d8699d4825a366d6 (diff) | |
download | rails-e4dc3035ce881baf371a8445391c9ca393406290.tar.gz rails-e4dc3035ce881baf371a8445391c9ca393406290.tar.bz2 rails-e4dc3035ce881baf371a8445391c9ca393406290.zip |
Merge pull request #13981 from Fortisque/kevin/postgresql_reaper_threadsafe
Reaper has access to threadsafe active? call
Diffstat (limited to 'activerecord/lib/active_record/connection_adapters/abstract_adapter.rb')
-rw-r--r-- | activerecord/lib/active_record/connection_adapters/abstract_adapter.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/activerecord/lib/active_record/connection_adapters/abstract_adapter.rb b/activerecord/lib/active_record/connection_adapters/abstract_adapter.rb index 3c94bad208..11b28a4858 100644 --- a/activerecord/lib/active_record/connection_adapters/abstract_adapter.rb +++ b/activerecord/lib/active_record/connection_adapters/abstract_adapter.rb @@ -262,6 +262,12 @@ module ActiveRecord def active? end + # Adapter should redefine this if it needs a threadsafe way to approximate + # if the connection is active + def active_threadsafe? + active? + end + # Disconnects from the database if already connected, and establishes a # new connection with the database. Implementors should call super if they # override the default implementation. |