Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrapper object using a destructor appears to hang on closing the sqlitedict #95

Open
CMCDragonkai opened this issue Apr 11, 2019 · 0 comments

Comments

@CMCDragonkai
Copy link

CMCDragonkai commented Apr 11, 2019

I have found that wrapping sqlitedict in an class with a destructor doesn't seem to work.

Here's just a snippet of my code:

from sqlitedict import SqliteDict

class Store():

    def __init__(self, path):
        self._map = SqliteDict(path, autocommit=False)

    def __del__(self):
        self._map.close()

store = Store('tmp/ext')

Run this with python ./script.py. And it just hangs.

Instead I have to use close(force=True) for it actually properly close.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant