MCPcopy Create free account
hub / github.com/FastLED/FastLED / is_lock_stale

Function is_lock_stale

ci/util/file_lock_rw.py:92–104  ·  view source on GitHub ↗

Check if a lock is stale (all holder processes are dead). Args: lock_file_path: Path to the lock file Returns: True if lock is stale, False if still active or no lock exists

(lock_file_path: Path)

Source from the content-addressed store, hash-verified

90
91
92def is_lock_stale(lock_file_path: Path) -> bool:
93 """
94 Check if a lock is stale (all holder processes are dead).
95
96 Args:
97 lock_file_path: Path to the lock file
98
99 Returns:
100 True if lock is stale, False if still active or no lock exists
101 """
102 db = get_lock_database(lock_file_path)
103 lock_name = str(lock_file_path)
104 return db.is_lock_stale(lock_name)
105
106
107def break_stale_lock(lock_file_path: Path) -> bool:

Calls 2

get_lock_databaseFunction · 0.90
is_lock_staleMethod · 0.80