Skip to content

Commit

Permalink
Fix DeprecationWarning on method Thread.setDaemon
Browse files Browse the repository at this point in the history
  • Loading branch information
wchistow authored and Manishearth committed May 21, 2024
1 parent 42a88dc commit d934768
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions chatexchange/browser.py
Original file line number Diff line number Diff line change
Expand Up @@ -743,7 +743,7 @@ def start(self):
name="ChatExchange: RoomSocketWatcher for room #{}".format(
self.room_id),
target=self._runner)
self.thread.setDaemon(True)
self.thread.daemon = True
self.thread.start()

def _runner(self):
Expand Down Expand Up @@ -778,7 +778,7 @@ def start(self):
name="ChatExchange: RoomPollingWatcher for room #{}".format(
self.room_id),
target=self._runner)
self.thread.setDaemon(True)
self.thread.daemon = True
self.thread.start()

def close(self):
Expand Down
2 changes: 1 addition & 1 deletion chatexchange/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ def __init__(
self._recently_gotten_objects = collections.deque(maxlen=self._max_recently_gotten_objects)
self._requests_served = 0
self._thread = threading.Thread(target=self._worker, name="ChatExchange: message_sender for chat.{}".format(host))
self._thread.setDaemon(True)
self._thread.daemon = True

self.aggressive_sender = send_aggressively

Expand Down

0 comments on commit d934768

Please sign in to comment.