params: fix cleanup hang on exit (#38562)

This commit is contained in:
Adeeb Shihadeh
2026-08-07 11:29:47 -07:00
committed by GitHub
parent ff9c703289
commit 4e9e9190a5
+1
View File
@@ -117,6 +117,7 @@ class Params:
path = ensure_bytes(d)
self.p = params_create(path, len(path))
self._finalizer = weakref.finalize(self, params_destroy, self.p)
self._finalizer.atexit = False # daemon threads can still be using live Params handles during interpreter shutdown
self.d = d
def __reduce__(self):