def get_and_add(self, delta):
        '''
        Atomically adds `delta` to the current value and returns the old value.

        :param delta: The delta to add.
        '''
        with self._reference.get_lock():
            oldval = self._reference.value
            self._reference.value += delta
            return oldval
Atomically adds `delta` to the current value and returns the old value.

        :param delta: The delta to add.