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
8 changes: 4 additions & 4 deletions Doc/builtins/threadsafety.rst
Original file line number Diff line number Diff line change
Expand Up @@ -408,19 +408,19 @@ as operands and always lock both objects:
iterate through all the passed iterables and do the following:

* :meth:`set.update` and :meth:`set.union` lock both objects only when
the other operand is a :class:`set`, :class:`frozenset`, or :class:`dict`.
the other operand is a :class:`set`, :class:`frozenset`, or :class:`dict`.
* :meth:`set.intersection` and :meth:`set.difference` always try to lock
all objects.
all objects.

:meth:`set.symmetric_difference` tries to lock both objects.

The update variants of the above methods also have some differences between
them:

* :meth:`set.difference_update` and :meth:`set.intersection_update` try
to lock all objects one-by-one.
to lock all objects one-by-one.
* :meth:`set.symmetric_difference_update` only locks the arguments if it is
of type :class:`set`, :class:`frozenset`, or :class:`dict`.
of type :class:`set`, :class:`frozenset`, or :class:`dict`.

The following methods always try to lock both objects:

Expand Down
Loading