mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-30 01:04:59 +00:00
Use a daemon thread to load_slow_imports
This commit is contained in:
parent
b61b394700
commit
44e6fefc23
1 changed files with 4 additions and 1 deletions
|
@ -548,7 +548,9 @@ def main(argv=None, input=None, output=None, force_git_root=None, return_coder=F
|
||||||
if args.exit:
|
if args.exit:
|
||||||
return
|
return
|
||||||
|
|
||||||
threading.Thread(target=load_slow_imports).start()
|
thread = threading.Thread(target=load_slow_imports)
|
||||||
|
thread.daemon = True
|
||||||
|
thread.start()
|
||||||
|
|
||||||
while True:
|
while True:
|
||||||
try:
|
try:
|
||||||
|
@ -564,6 +566,7 @@ def load_slow_imports():
|
||||||
# improve startup time.
|
# improve startup time.
|
||||||
# This func is called in a thread to load them in the background
|
# This func is called in a thread to load them in the background
|
||||||
# while we wait for the user to type their first message.
|
# while we wait for the user to type their first message.
|
||||||
|
|
||||||
try:
|
try:
|
||||||
import httpx # noqa: F401
|
import httpx # noqa: F401
|
||||||
import litellm # noqa: F401
|
import litellm # noqa: F401
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue