Skip to content

Commit 75e9d66

Browse files
committed
fix(robotlangserver): if a lock takes to long, try to cancel the lock
1 parent 89e0db2 commit 75e9d66

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

robotcode/utils/async_tools.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -462,7 +462,8 @@ async def acquire(self) -> bool:
462462
try:
463463

464464
def aaa(s: Any) -> None:
465-
warnings.warn(f"Lock takes to long {threading.current_thread()}\n{s}")
465+
warnings.warn(f"Lock takes to long {threading.current_thread()}\n{s}, try to cancel...")
466+
fut.cancel()
466467

467468
h = fut.get_loop().call_later(120, aaa, "".join(traceback.format_stack()))
468469

0 commit comments

Comments
 (0)