Skip to content

Commit f1f532a

Browse files
committed
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.
1 parent 3480faa commit f1f532a

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

docs/manual.adoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -461,9 +461,9 @@ Almost all functions in pugixml have the following thread-safety guarantees:
461461

462462
* it is safe to call free (non-member) functions from multiple threads
463463
* it is safe to perform concurrent read-only accesses to the same tree (all constant member functions do not modify the tree)
464-
* 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
464+
* 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
465465

466-
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.
466+
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.
467467

468468
The only exception is <<set_memory_management_functions,set_memory_management_functions>>; it modifies global variables and as such is not thread-safe. Its usage policy has more restrictions, see <<dom.memory.custom>>.
469469

docs/manual.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1356,12 +1356,12 @@ <h3 id="dom.thread"><a class="anchor" href="#dom.thread"></a><a class="link" hre
13561356
<p>it is safe to perform concurrent read-only accesses to the same tree (all constant member functions do not modify the tree)</p>
13571357
</li>
13581358
<li>
1359-
<p>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</p>
1359+
<p>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</p>
13601360
</li>
13611361
</ul>
13621362
</div>
13631363
<div class="paragraph">
1364-
<p>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.</p>
1364+
<p>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.</p>
13651365
</div>
13661366
<div class="paragraph">
13671367
<p>The only exception is <a href="#set_memory_management_functions">set_memory_management_functions</a>; it modifies global variables and as such is not thread-safe. Its usage policy has more restrictions, see <a href="#dom.memory.custom">Custom memory allocation/deallocation functions</a>.</p>
@@ -6216,7 +6216,7 @@ <h3 id="apiref.functions"><a class="anchor" href="#apiref.functions"></a><a clas
62166216
</div>
62176217
<div id="footer">
62186218
<div id="footer-text">
6219-
Last updated 2024-10-30 10:34:38 -0700
6219+
Last updated 2024-11-05 07:43:48 -0800
62206220
</div>
62216221
</div>
62226222
</body>

0 commit comments

Comments
 (0)