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

Support abort signal in iterator.all() #13

Open
ronag opened this issue Apr 1, 2022 · 2 comments
Open

Support abort signal in iterator.all() #13

ronag opened this issue Apr 1, 2022 · 2 comments

Comments

@ronag
Copy link
Contributor

ronag commented Apr 1, 2022

Currently there is no good way to abort a iterator.all() call. Would be nice if the api could support AbortController.

@vweevers
Copy link
Member

vweevers commented Apr 3, 2022

If your all() call is a long-running operation (getting many entries) it might not be the best method to use. For that same reason, all() currently uses nextv() under the hood, rather than a dedicated and optimized C++ method for all(). Because I assumed that the iterator typically just needs a few nextv() calls to get all entries. That does give us a way to abort, in between nextv() calls, but I'm not sure that fits your use case.

Assuming that we did have such a dedicated method, let's say iterator_all() - how would we cancel the async work in C++?

@vweevers
Copy link
Member

vweevers commented Nov 14, 2022

Level/abstract-level#55 (as noted there, implementations have to handle the aborting, so there will be additional work here).

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

No branches or pull requests

2 participants