MCPcopy Index your code
hub / github.com/python/cpython / lock

Method lock

Lib/mailbox.py:699–703  ·  view source on GitHub ↗

Lock the mailbox.

(self)

Source from the content-addressed store, hash-verified

697 return len(self._toc)
698
699 def lock(self):
700 """Lock the mailbox."""
701 if not self._locked:
702 _lock_file(self._file)
703 self._locked = True
704
705 def unlock(self):
706 """Unlock the mailbox if it is locked."""

Callers

nothing calls this directly

Calls 1

_lock_fileFunction · 0.85

Tested by

no test coverage detected