You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This commit was created on GitHub.com and signed with GitHub’s verified signature.
Fixed
Database(persistent=True) kept a finished thread's connection open until close() or interpreter exit, so a long-lived Database used from short-lived threads (a recycling pool, a server, a library called from its users' threads) accumulated one open connection per thread. A thread's connection is now closed when the thread ends: the slot registry is a WeakSet and each connection has a weakref.finalize. A connection inherited across a fork is left alone, as close() already did. (#12)