Skip to content

Commit

Permalink
DDGS.__init__(): use thread as daemon
Browse files Browse the repository at this point in the history
  • Loading branch information
deedy5 committed Feb 23, 2024
1 parent 10dc371 commit d5b93f7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion duckduckgo_search/duckduckgo_search.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ def __init__(self, headers=None, proxies=None, timeout=10):
self._queue = queue.Queue()
self._loop = asyncio.new_event_loop()
asyncio.set_event_loop(self._loop)
self._thread = Thread(target=self._loop.run_forever)
self._thread = Thread(target=self._loop.run_forever, daemon=True)
self._thread.start()

def __enter__(self) -> "DDGS":
Expand Down

0 comments on commit d5b93f7

Please sign in to comment.