def get_and_subtract(self, delta):
        '''
        Atomically subtracts `delta` from the current value and returns the
        old value.

        :param delta: The delta to subtract.
        '''
        with self._reference.get_lock():
            oldval = self._reference.value
            self._reference.value -= delta
            return oldval
Atomically subtracts `delta` from the current value and returns the
        old value.

        :param delta: The delta to subtract.