def enter_critical_phase_until_transaction_end(connection, cursor):
    """
        Given a connection and cursor opened by this driver, cause it
        to attempt to raise its priority and return results faster.

        This mostly has meaning for gevent drivers, which may limit
        the amount of time they spend in the hub and the number of context
        switches to other greenlets.

        This phase continues until *after* the ultimate call that
        commits or aborts is sent, but should revert to normal as quickly as
        possible after that. :class:`IRelStorageAdapter` may cooperate with
        the driver using implementation-specific methods to end the phase
        at an appropriate time if there is a hidden commit.

        This method must be idempotent (have the same effect if called more than
        once) within a given transaction.
        """
