mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-30 01:04:59 +00:00
refactor: extract thread launch for load_slow_imports into function
This commit is contained in:
parent
2eae3738ff
commit
ed7a9c6562
1 changed files with 7 additions and 3 deletions
|
@ -686,9 +686,7 @@ def main(argv=None, input=None, output=None, force_git_root=None, return_coder=F
|
|||
if args.exit:
|
||||
return
|
||||
|
||||
thread = threading.Thread(target=load_slow_imports)
|
||||
thread.daemon = True
|
||||
thread.start()
|
||||
launch_slow_imports_thread()
|
||||
|
||||
while True:
|
||||
try:
|
||||
|
@ -706,6 +704,12 @@ def main(argv=None, input=None, output=None, force_git_root=None, return_coder=F
|
|||
coder.show_announcements()
|
||||
|
||||
|
||||
def launch_slow_imports_thread():
|
||||
thread = threading.Thread(target=load_slow_imports)
|
||||
thread.daemon = True
|
||||
thread.start()
|
||||
|
||||
|
||||
def load_slow_imports():
|
||||
# These imports are deferred in various ways to
|
||||
# improve startup time.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue