@@ -1751,6 +1751,16 @@ class ZstdCompressor(object):
1751
1751
``write_checksum``, ``write_content_size``, ``write_dict_id``, and
1752
1752
``threads``.
1753
1753
1754
+ Assume that each ``ZstdCompressor`` instance can only handle a single
1755
+ logical compression operation at the same time. i.e. if you call a method
1756
+ like ``stream_reader()`` to obtain multiple objects derived from the same
1757
+ ``ZstdCompressor`` instance and attempt to use them simultaneously, errors
1758
+ will likely occur.
1759
+
1760
+ If you need to perform multiple logical compression operations and you
1761
+ can't guarantee those operations are temporally non-overlapping, you need
1762
+ to obtain multiple ``ZstdCompressor`` instances.
1763
+
1754
1764
Unless specified otherwise, assume that no two methods of
1755
1765
``ZstdCompressor`` instances can be called from multiple Python
1756
1766
threads simultaneously. In other words, assume instances are not thread safe
@@ -3645,6 +3655,16 @@ class ZstdDecompressor(object):
3645
3655
The interface of this class is very similar to
3646
3656
:py:class:`zstandard.ZstdCompressor` (by design).
3647
3657
3658
+ Assume that each ``ZstdDecompressor`` instance can only handle a single
3659
+ logical compression operation at the same time. i.e. if you call a method
3660
+ like ``decompressobj()`` to obtain multiple objects derived from the same
3661
+ ``ZstdDecompressor`` instance and attempt to use them simultaneously, errors
3662
+ will likely occur.
3663
+
3664
+ If you need to perform multiple logical decompression operations and you
3665
+ can't guarantee those operations are temporally non-overlapping, you need
3666
+ to obtain multiple ``ZstdDecompressor`` instances.
3667
+
3648
3668
Unless specified otherwise, assume that no two methods of
3649
3669
``ZstdDecompressor`` instances can be called from multiple Python
3650
3670
threads simultaneously. In other words, assume instances are not thread safe
0 commit comments