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

Function lock

library/python/filelock/ut/test_filelock.py:63–71  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

61 filename = 'thread.lock'
62
63 def lock():
64 lock = library.python.filelock.FileLock(filename)
65 time.sleep(1)
66 assert lock.acquire()
67 lock.release()
68 try:
69 os.unlink(filename)
70 except OSError:
71 pass
72
73 threads = []
74 for i in range(100):

Callers

nothing calls this directly

Calls 4

acquireMethod · 0.95
releaseMethod · 0.95
sleepMethod · 0.80
unlinkMethod · 0.80

Tested by

no test coverage detected