Skip to content

Commit

Permalink
fix: use daemon threads for conn pool and poller (#20)
Browse files Browse the repository at this point in the history
  • Loading branch information
bgiori committed Mar 29, 2023
1 parent 62e07f0 commit fd8360a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/amplitude_experiment/connection_pool.py
Expand Up @@ -164,6 +164,7 @@ def start_clear_conn(self) -> None:
return
self.clear_idle_conn()
self._clearer = threading.Timer(self.idle_timeout, self.start_clear_conn)
self._clearer.daemon = True
self._clearer.start()

def stop_clear_conn(self) -> None:
Expand Down
1 change: 1 addition & 0 deletions src/amplitude_experiment/local/poller.py
Expand Up @@ -26,6 +26,7 @@ def start(self):
self.next_call = time.time()
self.next_call += self.interval
self._timer = threading.Timer(self.next_call - time.time(), self._run)
self._timer.daemon = True
self._timer.start()
self.is_running = True

Expand Down

0 comments on commit fd8360a

Please sign in to comment.