]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
[3.13] gh-131544: Update docs for PyType_AddWatcher (gh-132015) (gh-132019)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Wed, 2 Apr 2025 16:24:43 +0000 (18:24 +0200)
committerGitHub <noreply@github.com>
Wed, 2 Apr 2025 16:24:43 +0000 (01:24 +0900)
gh-131544: Update docs for PyType_AddWatcher (gh-132015)
(cherry picked from commit 25275bda790e8a689092e83855d6d0574f26061b)

Co-authored-by: Donghee Na <donghee.na@python.org>
Doc/c-api/type.rst

index 4ba3f7ac2fafa489e10be7be022fbc533d09c96e..be87b689fa1c22b3938c84b40cc43f2b79f9df03 100644 (file)
@@ -82,6 +82,9 @@ Type Objects
    error (e.g. no more watcher IDs available), return ``-1`` and set an
    exception.
 
+   In free-threaded builds, :c:func:`PyType_AddWatcher` is not thread-safe,
+   so it must be called at start up (before spawning the first thread).
+
    .. versionadded:: 3.12