doc: The same JSON values must not be encoded in parallel
Closes GH-42.
This commit is contained in:
parent
0f2cdd70ff
commit
0931d938b0
@ -20,6 +20,16 @@ such values, as containers manage the reference count of their
|
||||
contained values. Bugs involving concurrent incrementing or
|
||||
decrementing of deference counts may be hard to track.
|
||||
|
||||
The encoding functions (:func:`json_dumps()` and friends) track
|
||||
reference loops by modifying the internal state of objects and arrays.
|
||||
For this reason, encoding functions must not be run on the same JSON
|
||||
values in two separate threads at the same time. As already noted
|
||||
above, be especially careful if two arrays or objects share their
|
||||
contained values with another array or object.
|
||||
|
||||
If you want to make sure that two JSON value hierarchies do not
|
||||
contain shared values, use :func:`json_deep_copy()` to make copies.
|
||||
|
||||
Locale
|
||||
------
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user