Fix a deprecation warning about threading.Thread

Fix the following deprecation warning.

* DeprecationWarning: setDaemon() is deprecated,
  set the daemon attribute instead

Change-Id: I7af41eddf597e1ac78e8835a5af2e029d65a302a
Closes-Bug: 1987191
Signed-off-by: Takashi Natsume <takanattie@gmail.com>
This commit is contained in:
Takashi Natsume
2022-08-21 21:07:52 +09:00
parent cb60c1d2fa
commit 1b08481491

View File

@@ -257,7 +257,7 @@ class CacheWorker(threading.Thread):
# NOTE(abhishekk): Setting daemon to True because if `atexit` event
# handler is not called due to some reason the main process will
# not hang for the thread which will never exit.
self.setDaemon(True)
self.daemon = True
def submit(self, job):
self.q.put(job)