MCPcopy Create free account
hub / github.com/catboost/catboost / _acquire_lock

Function _acquire_lock

library/python/filelock/ut/test_filelock.py:11–15  ·  view source on GitHub ↗
(lock_path, out_file_path)

Source from the content-addressed store, hash-verified

9
10
11def _acquire_lock(lock_path, out_file_path):
12 with library.python.filelock.FileLock(lock_path):
13 with open(out_file_path, "a") as out:
14 out.write("{}:{}\n".format(os.getpid(), time.time()))
15 time.sleep(2)
16
17
18def test_filelock():

Callers

nothing calls this directly

Calls 4

sleepMethod · 0.80
openFunction · 0.50
writeMethod · 0.45
formatMethod · 0.45

Tested by

no test coverage detected