rvesse commented on code in PR #1994:
URL: https://github.com/apache/jena/pull/1994#discussion_r1298281763
##########
jena-core/src/main/java/org/apache/jena/graph/GraphMemFactory.java:
##########
@@ -30,8 +30,17 @@
/**
* A factory class for creating memory Graphs.
* <p>
- * Apache Jena is migrating to term semantics graph for consistency across all
in-memory and persistent storage graphs
- *
+ * Apache Jena is migrating to term semantics graph for consistency across all
in-memory and persistent storage graphs.
+ * <p>
+ * All the graphs that this factory creates are <strong>not
thread-safe</strong>.
+ * Note that if the memory Graph is structurally modified at any time after
+ * the iterator has been created by any of the {@code find*} or {@code
stream*} methods, the iterator may throw
+ * a {@link java.util.ConcurrentModificationException
ConcurrentModificationException}
+ * if continued with it after this modification.
+ * This may happen even if the queried data does not relate directly to
modified data
+ * (i.e. when triple search pattern does not match added or deleted triple).
+ * The good practice is to explicitly close iterators immediately after a read
operation or
+ * use terminate operations such as {@link ExtendedIterator#toList()}.
Review Comment:
```suggestion
* use materialising operations such as {@link ExtendedIterator#toList()}.
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]