-
Notifications
You must be signed in to change notification settings - Fork 18
Explicit close() ? #13
Comments
Notably the current API would mandate one always-open connection (at least once the module is imported once) for the |
Is this still true even given full use of the IDB API on the database/store (via |
Not entirely sure what
EDIT: Saw that backingStore is more fleshed out in the README. No change to above. |
Other than the blocking issue when mixing the APIs (noted above): yes, it's fine to keep a connection open for the lifetime of the page. Aside: the blocking behavior will span agents within the origin, in case that's not obvious. Aside # 2: I'd actually missed the |
I'm leaning toward having |
I'm tentatively resolved in favor of not including close(), but it doesn't cost much. So I'll leave this issue open, with a "tentatively resolved" label, to signal to people that it's open for discussion. |
FWIW, not having a close will make benchmarking more difficult. This is not a core use case, but I think it still matters to the API's long-term well-being. |
The current proposal relies on garbage collection to reclaim the StorageArea before the connection will be closed. Once #10 is resolved, this should not be observable since actions on areas should never block on upgrades (since the version is fixed).
Therefore I don't think there's a strong reason to complicate the API with
close()
, but I wanted to raise the issue.The text was updated successfully, but these errors were encountered: