@@ -1751,6 +1751,16 @@ class ZstdCompressor(object):
17511751 ``write_checksum``, ``write_content_size``, ``write_dict_id``, and
17521752 ``threads``.
17531753
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+
17541764 Unless specified otherwise, assume that no two methods of
17551765 ``ZstdCompressor`` instances can be called from multiple Python
17561766 threads simultaneously. In other words, assume instances are not thread safe
@@ -3645,6 +3655,16 @@ class ZstdDecompressor(object):
36453655 The interface of this class is very similar to
36463656 :py:class:`zstandard.ZstdCompressor` (by design).
36473657
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+
36483668 Unless specified otherwise, assume that no two methods of
36493669 ``ZstdDecompressor`` instances can be called from multiple Python
36503670 threads simultaneously. In other words, assume instances are not thread safe
0 commit comments