Skip to content

Commit b772236

Browse files
committed
Reduced timeout for mock file Locking to 0.5 seconds
1 parent 441ce6b commit b772236

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

mbed_lstools/lstools_base.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -253,7 +253,7 @@ def read_mock_file(filename):
253253

254254
try:
255255
lock = self.mbedls_get_global_lock()
256-
if lock.acquire(timeout=1):
256+
if lock.acquire(timeout=0.5):
257257
# This read is for backward compatibility
258258
# When user already have on its system local mock-up it will work
259259
# overwriting global one
@@ -290,7 +290,7 @@ def write_mock_file(filename, mock_ids):
290290

291291
try:
292292
lock = self.mbedls_get_global_lock()
293-
if lock.acquire(timeout=1):
293+
if lock.acquire(timeout=0.5):
294294
ret = write_mock_file(self.MOCK_HOME_FILE_NAME, mock_ids)
295295
lock.release()
296296
return ret

0 commit comments

Comments
 (0)