MCPcopy Create free account
hub / github.com/RT-Thread/env-windows / lock

Method lock

tools/python-3.11.9-amd64/Lib/mailbox.py:1093–1098  ·  view source on GitHub ↗

Lock the mailbox.

(self)

Source from the content-addressed store, hash-verified

1091 return len(list(self.iterkeys()))
1092
1093 def lock(self):
1094 """Lock the mailbox."""
1095 if not self._locked:
1096 self._file = open(os.path.join(self._path, '.mh_sequences'), 'rb+')
1097 _lock_file(self._file)
1098 self._locked = True
1099
1100 def unlock(self):
1101 """Unlock the mailbox if it is locked."""

Callers

nothing calls this directly

Calls 3

_lock_fileFunction · 0.85
openFunction · 0.70
joinMethod · 0.45

Tested by

no test coverage detected