Module: TestProf::ActiveRecordSharedConnection::Connection

Defined in:
lib/test_prof/recipes/active_record_shared_connection.rb

Instance Method Summary collapse

Instance Method Details

#exec_cacheObject



45
46
47
# File 'lib/test_prof/recipes/active_record_shared_connection.rb', line 45

def exec_cache(*)
  shared_lock.synchronize { super }
end

#exec_no_cacheObject



49
50
51
# File 'lib/test_prof/recipes/active_record_shared_connection.rb', line 49

def exec_no_cache(*)
  shared_lock.synchronize { super }
end

#executeObject



53
54
55
# File 'lib/test_prof/recipes/active_record_shared_connection.rb', line 53

def execute(*)
  shared_lock.synchronize { super }
end

#shared_lockObject



41
42
43
# File 'lib/test_prof/recipes/active_record_shared_connection.rb', line 41

def shared_lock
  @shared_lock ||= Mutex.new
end