method
execute_or_wait
rails latest stable - Class:
ActiveRecord::FutureResult
execute_or_wait()private
No documentation available.
# File activerecord/lib/active_record/future_result.rb, line 129
def execute_or_wait
if pending?
start = Process.clock_gettime(Process::CLOCK_MONOTONIC, :float_millisecond)
@mutex.synchronize do
if pending?
execute_query(@pool.connection)
else
@lock_wait = (Process.clock_gettime(Process::CLOCK_MONOTONIC, :float_millisecond) - start)
end
end
else
@lock_wait = 0.0
end
end