Open ronag opened 2 years ago
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++?
https://github.com/Level/abstract-level/pull/55 (as noted there, implementations have to handle the aborting, so there will be additional work here).
Currently there is no good way to abort a
iterator.all()
call. Would be nice if the api could supportAbortController
.