Skip to content

Commit

Permalink
Add daemon to all threads
Browse files Browse the repository at this point in the history
  • Loading branch information
Tomperez98 committed Jan 6, 2025
1 parent 86d3824 commit 4804274
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/resonate/queue.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ def __init__(self) -> None:

def start(self, cmd_queue: CommandQ) -> None:
assert self._worker_thread is None, "Already been started."
self._worker_thread = Thread(target=self._run, args=(cmd_queue,))
self._worker_thread = Thread(target=self._run, args=(cmd_queue,), daemon=True)
self._worker_thread.start()

def stop(self) -> None:
Expand Down
2 changes: 1 addition & 1 deletion src/resonate/scheduler/scheduler.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ def __init__(
self._delay_queue = DelayQueue()

self._heartbeat_thread = Thread(target=self._heartbeat, daemon=True)
self._scheduler_thread = Thread(target=self._loop)
self._scheduler_thread = Thread(target=self._loop, daemon=True)

def start(self) -> None:
if isinstance(self._store, RemoteStore):
Expand Down

0 comments on commit 4804274

Please sign in to comment.