def METHOD_NAME(self, obj):
    """Pushes a new item to the stack"""
    self._lock.acquire()
    try:
        rv = getattr(self._local, 'stack', None)
        if rv is None:
            self._local.stack = rv = []
        rv.append(obj)
        return rv
    finally:
        self._lock.release()