Browse Source

Don't wait for thread to exit in __del__

This can hit a deadlock waiting for the thread to exit.  We don't
need to wait; it will die when it can, or get terminated when the
interpreter exits.
tags/nilmdb-2.0.0
Jim Paris 4 years ago
parent
commit
113633459d
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      nilmdb/utils/serializer.py

+ 1
- 1
nilmdb/utils/serializer.py View File

@@ -118,8 +118,8 @@ def serializer_proxy(obj_or_type):

def __del__(self):
try:
# Signal thread to exit, but don't wait for it.
self.__call_queue.put((None, None, None, None))
self.__thread.join()
except: # pragma: no cover
pass



Loading…
Cancel
Save