method

execute_or_skip

Importance_0
v8.1.1 - Show latest stable - 0 notes - Class: FutureResult
execute_or_skip() public

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 100
    def execute_or_skip
      return unless pending?

      @session.synchronize do
        return unless pending?

        @pool.with_connection do |connection|
          return unless @mutex.try_lock
          begin
            if pending?
              @event_buffer = EventBuffer.new(self, @instrumenter)
              ActiveSupport::IsolatedExecutionState[:active_record_instrumenter] = @event_buffer

              execute_query(connection, async: true)
            end
          ensure
            @mutex.unlock
          end
        end
      end
    end
Register or log in to add new notes.