Closed rubensworks closed 2 years ago
Oops that's very worrying. Thanks, let me have a look.
Note for v4.0: we should avoid needing to update this in multiple places.
@rubensworks Counter-proposal at 87006a5ad23ad77ec860bb0142dfe5c623aeb043
The problem was broader: other aspects of setting a source on a closed iterator were also inconsistent with the behavior on open iterators (such as checking whether the source is valid).
@RubenVerborgh Looks good to me! Just tested it on my end, and everything still seems to work with the new fix.
Great, published as v3.6.2!
Thanks!
When a TransformIterator receives an async callback as input, but the callback is very slow, race conditions could occur when destroying the iterator. Concretely, when the iterator was closed/destroy before the callback resolves, the underlying iterator would never be destroyed.
FYI, this caused major problems in the context with link traversal, where the query would end, but underlying link traversal iterators (which can be infinite) kept on running.
This fix should also be taken into account when #83 is being fixed.