mirror of
https://github.com/zeux/pugixml.git
synced 2024-12-25 11:50:50 +08:00
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.
This commit is contained in:
parent
3480faa837
commit
f1f532acfc
@ -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 <<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>>.
|
||||
|
||||
|
@ -1356,12 +1356,12 @@ There are cases when you’ll have to convert string data between UTF-8 and
|
||||
<p>it is safe to perform concurrent read-only accesses to the same tree (all constant member functions do not modify the tree)</p>
|
||||
</li>
|
||||
<li>
|
||||
<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>
|
||||
<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>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="paragraph">
|
||||
<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>
|
||||
<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>
|
||||
</div>
|
||||
<div class="paragraph">
|
||||
<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 @@ If exceptions are disabled, then in the event of parsing failure the query is in
|
||||
</div>
|
||||
<div id="footer">
|
||||
<div id="footer-text">
|
||||
Last updated 2024-10-30 10:34:38 -0700
|
||||
Last updated 2024-11-05 07:43:48 -0800
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
|
Loading…
x
Reference in New Issue
Block a user