refactor: simplify file watcher thread cleanup by removing timeout

This commit is contained in:
Paul Gauthier (aider) 2024-10-25 12:59:09 -07:00
parent 8e81300f37
commit 7587d76fd1

View file

@ -458,9 +458,7 @@ class InputOutput:
finally: finally:
# Clean up the watcher thread # Clean up the watcher thread
stop_event.set() stop_event.set()
watcher.join(timeout=1.0) # Wait up to 1 second for thread to finish watcher.join() # Thread should exit quickly due to stop_event
if watcher.is_alive():
self.tool_warning("Warning: File watcher thread did not shut down cleanly")
if line and line[0] == "{" and not multiline_input: if line and line[0] == "{" and not multiline_input:
multiline_input = True multiline_input = True