MCPcopy Create free account
hub / github.com/emscripten-core/emscripten / _acquire

Method _acquire

tools/filelock.py:426–434  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

424 """
425
426 def _acquire(self):
427 open_mode = os.O_WRONLY | os.O_CREAT | os.O_EXCL | os.O_TRUNC
428 try:
429 fd = os.open(self._lock_file, open_mode)
430 except (IOError, OSError):
431 pass
432 else:
433 self._lock_file_fd = fd
434 return None
435
436 def _release(self):
437 os.close(self._lock_file_fd)

Callers

nothing calls this directly

Calls 1

openMethod · 0.45

Tested by

no test coverage detected