parameters: (self)
docstring: A context manager that performs actions in the given directory.
docstring_summary: A context manager that performs actions in the given directory.
docstring_tokens: A context manager that performs actions in the given directory .
function: def lock(self):
      """A context manager that performs actions in the given directory."""
      self.acquire_cache_lock()
      try:
        yield
      finally:
        self.release_cache_lock()
function_tokens: def lock ( self ) : self . acquire_cache_lock ( ) try : yield finally : self . release_cache_lock ( )