Skip to content

Commit 31a4385

Browse files
committed
Mention thread safety in PyDict_Next()
1 parent 60b622f commit 31a4385

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Doc/c-api/dict.rst

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -369,7 +369,7 @@ Dictionary objects
369369
}
370370
371371
The function is not thread-safe in the :term:`free-threaded <free threading>`
372-
build without external synchronization. You can use
372+
build without external synchronization for a mutable :class:`dict`. You can use
373373
:c:macro:`Py_BEGIN_CRITICAL_SECTION` to lock the dictionary while iterating
374374
over it::
375375
@@ -379,6 +379,8 @@ Dictionary objects
379379
}
380380
Py_END_CRITICAL_SECTION();
381381
382+
The function is thread-safe on a :class:`frozendict`.
383+
382384
.. note::
383385
384386
On the free-threaded build, this function can be used safely inside a

0 commit comments

Comments
 (0)