rdfjs / N3.js

Lightning fast, spec-compatible, streaming RDF for JavaScript
http://rdf.js.org/N3.js/
Other
714 stars 130 forks source link

chore: add tests for concurrent read/write behaviour #290

Closed jeswr closed 2 years ago

jeswr commented 2 years ago

This adds some sanity checks for reading from a match iterator whilst concurrently adding new data, in light of the changes in v1.16 where we are now iterating over the index rather than eagerly placing all matches into a list.

jeswr commented 2 years ago

A use case for such behaviour, is in reasoning where we are adding new implicit facts whilst reading from the store at the same time to calculate new inferences.

The comunica reasoning components that I am working on will implicitly do this if the destination for the implicit data is set to be the same as the source of the raw data.

jeswr commented 2 years ago

Pinging @RubenVerborgh for review