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

take care of closing storage #19

Closed
tomasciccola opened this issue Nov 14, 2023 · 0 comments · Fixed by #20
Closed

take care of closing storage #19

tomasciccola opened this issue Nov 14, 2023 · 0 comments · Fixed by #20
Assignees

Comments

@tomasciccola
Copy link

this library instances a bunch of CoreIndexStreams, each with a storage (random-access-storage) instance. Every CoreIndexStream gets added to the MultiCoreIndexStream.
Options to be able to close every storage instance could be:

  1. Expose storage from CoreIndexStream. On MultiCoreIndexStream on the [kdestroyPromise]() method (or a different close method?), iterate over this.#streams, access each instance of storage and close it
  2. On MultiCoreIndexer class, keep track of each storage instance (adding them to a list or smth - would I be making copies or are they just references?). This would probably happen on the static method defaultStorage
@tomasciccola tomasciccola self-assigned this Nov 14, 2023
gmaclennan added a commit that referenced this issue Nov 15, 2023
gmaclennan added a commit that referenced this issue Nov 16, 2023
* fix: close storages on close

fixes #19

* add tests

* remove only in test

* remove storage references on 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

Successfully merging a pull request may close this issue.

2 participants