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

Method lock

Lib/mailbox.py:1170–1175  ·  view source on GitHub ↗

Lock the mailbox.

(self)

Source from the content-addressed store, hash-verified

1168 pass
1169
1170 def lock(self):
1171 """Lock the mailbox."""
1172 if not self._locked:
1173 self._file = self._open_mh_sequences_file(text=False)
1174 _lock_file(self._file)
1175 self._locked = True
1176
1177 def unlock(self):
1178 """Unlock the mailbox if it is locked."""

Callers 7

test_lock_unlockMethod · 0.45
test_lock_unlockMethod · 0.45
test_lock_conflictMethod · 0.45
test_relockMethod · 0.45
test_issue7627Method · 0.45
test_packMethod · 0.45

Calls 2

_lock_fileFunction · 0.85

Tested by 7

test_lock_unlockMethod · 0.36
test_lock_unlockMethod · 0.36
test_lock_conflictMethod · 0.36
test_relockMethod · 0.36
test_issue7627Method · 0.36
test_packMethod · 0.36