Fix PeriodicallyFlushingMemoryHandler inhibiting application shutdown (#10517)

This commit is contained in:
reivilibre 2021-08-03 14:28:30 +01:00 committed by GitHub
parent 6878e10653
commit 903db99ed5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 0 deletions

1
changelog.d/10517.bugfix Normal file
View File

@ -0,0 +1 @@
Fix the `PeriodicallyFlushingMemoryHandler` inhibiting application shutdown because of its background thread.

View File

@ -45,6 +45,7 @@ class PeriodicallyFlushingMemoryHandler(MemoryHandler):
self._flushing_thread: Thread = Thread( self._flushing_thread: Thread = Thread(
name="PeriodicallyFlushingMemoryHandler flushing thread", name="PeriodicallyFlushingMemoryHandler flushing thread",
target=self._flush_periodically, target=self._flush_periodically,
daemon=True,
) )
self._flushing_thread.start() self._flushing_thread.start()