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:
@@ -257,7 +257,7 @@ class CacheWorker(threading.Thread):
|
|||||||
# NOTE(abhishekk): Setting daemon to True because if `atexit` event
|
# NOTE(abhishekk): Setting daemon to True because if `atexit` event
|
||||||
# handler is not called due to some reason the main process will
|
# handler is not called due to some reason the main process will
|
||||||
# not hang for the thread which will never exit.
|
# not hang for the thread which will never exit.
|
||||||
self.setDaemon(True)
|
self.daemon = True
|
||||||
|
|
||||||
def submit(self, job):
|
def submit(self, job):
|
||||||
self.q.put(job)
|
self.q.put(job)
|
||||||
|
|||||||
Reference in New Issue
Block a user