diff --git a/src/simpleRdf/Dataset.php b/src/simpleRdf/Dataset.php index bb40e9b..5daa7ec 100644 --- a/src/simpleRdf/Dataset.php +++ b/src/simpleRdf/Dataset.php @@ -384,7 +384,8 @@ private function listQuadElement(iQuadCompare | iQuadIterator | callable | null string $elementFn): Generator { try { $spotted = []; - $idx = $this->findMatchingQuads($filter); + // materialize to avoid problems with parallel quads iterations + $idx = iterator_to_array($this->findMatchingQuads($filter)); foreach ($idx as $i) { $i = $this->quads[$i]->$elementFn(); $flag = true;