From f1f532acfcd94426d4811bed4a2880657739004e Mon Sep 17 00:00:00 2001
From: Arseny Kapoulkine
Date: Tue, 5 Nov 2024 07:43:54 -0800
Subject: [PATCH] docs: Reword last bullet point of thread safety guarantees
This was worded somewhat confusingly; we should be explicit that it's
okay to access multiple documents concurrently as long as access to each
one is serialized.
---
docs/manual.adoc | 4 ++--
docs/manual.html | 6 +++---
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/docs/manual.adoc b/docs/manual.adoc
index a6cf07d5..a9cb35a7 100644
--- a/docs/manual.adoc
+++ b/docs/manual.adoc
@@ -461,9 +461,9 @@ Almost all functions in pugixml have the following thread-safety guarantees:
* it is safe to call free (non-member) functions from multiple threads
* it is safe to perform concurrent read-only accesses to the same tree (all constant member functions do not modify the tree)
-* it is safe to perform concurrent read/write accesses, if there is only one read or write access to the single tree at a time
+* it is safe to perform concurrent read/write accesses on multiple trees, as long as each tree is only accessed from a single thread at a time
-Concurrent modification and traversing of a single tree requires synchronization, for example via reader-writer lock. Modification includes altering document structure and altering individual node/attribute data, i.e. changing names/values.
+Concurrent read/write access to a single tree requires synchronization, for example via a reader-writer lock. Modification includes altering document structure and altering individual node/attribute data, i.e. changing names/values.
The only exception is <>; it modifies global variables and as such is not thread-safe. Its usage policy has more restrictions, see <>.
diff --git a/docs/manual.html b/docs/manual.html
index 0fb0c2d6..482d1ff7 100644
--- a/docs/manual.html
+++ b/docs/manual.html
@@ -1356,12 +1356,12 @@
-it is safe to perform concurrent read/write accesses, if there is only one read or write access to the single tree at a time
+it is safe to perform concurrent read/write accesses on multiple trees, as long as each tree is only accessed from a single thread at a time
-
Concurrent modification and traversing of a single tree requires synchronization, for example via reader-writer lock. Modification includes altering document structure and altering individual node/attribute data, i.e. changing names/values.
+
Concurrent read/write access to a single tree requires synchronization, for example via a reader-writer lock. Modification includes altering document structure and altering individual node/attribute data, i.e. changing names/values.