Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions Doc/library/pickle.rst
Original file line number Diff line number Diff line change
Expand Up @@ -316,6 +316,12 @@ The :mod:`!pickle` module exports three classes, :class:`Pickler`,
It is an error if *buffer_callback* is not ``None`` and *protocol* is
``None`` or smaller than 5.

.. note::
:class:`Pickler` objects are not thread-safe. Sharing a single
:class:`Pickler` instance across multiple threads without external
synchronization leads to undefined behavior. Use a separate instance
per thread.

.. versionchanged:: 3.8
The *buffer_callback* argument was added.

Expand Down Expand Up @@ -430,6 +436,12 @@ The :mod:`!pickle` module exports three classes, :class:`Pickler`,
an :ref:`out-of-band <pickle-oob>` buffer view. Such buffers have been
given in order to the *buffer_callback* of a Pickler object.

.. note::
:class:`Unpickler` objects are not thread-safe. Sharing a single
:class:`Unpickler` instance across multiple threads without external
synchronization leads to undefined behavior. Use a separate instance
per thread.

.. versionchanged:: 3.8
The *buffers* argument was added.

Expand Down
Loading