Set the limit data to the given list of limits.  Limits are
        specified as the raw msgpack string representing the limit.
        Computes the checksum of the limits; if the checksum is
        identical to the current one, no action is taken.

def set_limits(self, limits):
        """
        Set the limit data to the given list of limits.  Limits are
        specified as the raw msgpack string representing the limit.
        Computes the checksum of the limits; if the checksum is
        identical to the current one, no action is taken.
        """

        # First task, build the checksum of the new limits
        chksum = hashlib.md5()  # sufficient for our purposes
        for lim in limits:
            chksum.update(lim)
        new_sum = chksum.hexdigest()

        # Now install it
        with self.limit_lock:
            if self.limit_sum == new_sum:
                # No changes
                return
            self.limit_data = [msgpack.loads(lim) for lim in limits]
            self.limit_sum = new_sum