Module: TestProf::ActiveRecordSharedConnection::Connection

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

Instance Method Summary collapse

Instance Method Details

#exec_cacheObject



31
32
33
# File 'lib/test_prof/recipes/active_record_shared_connection.rb', line 31

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

#exec_no_cacheObject



35
36
37
# File 'lib/test_prof/recipes/active_record_shared_connection.rb', line 35

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

#executeObject



39
40
41
# File 'lib/test_prof/recipes/active_record_shared_connection.rb', line 39

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

#shared_lockObject



27
28
29
# File 'lib/test_prof/recipes/active_record_shared_connection.rb', line 27

def shared_lock
  @shared_lock ||= Mutex.new
end