method

execute_or_wait

Importance_0
v7.1.3.2 - Show latest stable - 0 notes - Class: FutureResult
execute_or_wait() private

No documentation

This method has no description. You can help the Ruby on Rails community by adding new notes.

Hide source
# 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
Register or log in to add new notes.