diff options
author | AN Long <aisk@users.noreply.github.com> | 2024-02-21 17:35:53 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-02-21 17:35:53 (GMT) |
commit | 87a65a5bd446a6fc74db651e56b04c332e33fa07 (patch) | |
tree | 804211d7149ee464c4b2f2e6e9ac9082b6b3fe3c /Include/internal/pycore_lock.h | |
parent | 5f7df88821347c5f44fc4e2c691e83a60a6c6cd5 (diff) | |
download | cpython-87a65a5bd446a6fc74db651e56b04c332e33fa07.zip cpython-87a65a5bd446a6fc74db651e56b04c332e33fa07.tar.gz cpython-87a65a5bd446a6fc74db651e56b04c332e33fa07.tar.bz2 |
gh-115304: Add doc for initializing PyMutex as a global variable (#115305)
Diffstat (limited to 'Include/internal/pycore_lock.h')
-rw-r--r-- | Include/internal/pycore_lock.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/Include/internal/pycore_lock.h b/Include/internal/pycore_lock.h index 07bf3db..c89159b 100644 --- a/Include/internal/pycore_lock.h +++ b/Include/internal/pycore_lock.h @@ -26,6 +26,9 @@ extern "C" { // Typical initialization: // PyMutex m = (PyMutex){0}; // +// Or initialize as global variables: +// static PyMutex m; +// // Typical usage: // PyMutex_Lock(&m); // ... |