From: Donghee Na Date: Wed, 2 Apr 2025 15:04:07 +0000 (+0900) Subject: gh-131544: Update docs for PyType_AddWatcher (gh-132015) X-Git-Tag: v3.14.0a7~97 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=25275bda790e8a689092e83855d6d0574f26061b;p=thirdparty%2FPython%2Fcpython.git gh-131544: Update docs for PyType_AddWatcher (gh-132015) --- diff --git a/Doc/c-api/type.rst b/Doc/c-api/type.rst index 862f1e67b9ad..ec2867b0ce09 100644 --- a/Doc/c-api/type.rst +++ b/Doc/c-api/type.rst @@ -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