https://github.com/python/cpython/commit/87a65a5bd446a6fc74db651e56b04c332e33fa07
commit: 87a65a5bd446a6fc74db651e56b04c332e33fa07
branch: main
author: AN Long <[email protected]>
committer: colesbury <[email protected]>
date: 2024-02-21T12:35:53-05:00
summary:
gh-115304: Add doc for initializing PyMutex as a global variable (#115305)
files:
M Include/internal/pycore_lock.h
diff --git a/Include/internal/pycore_lock.h b/Include/internal/pycore_lock.h
index 07bf3db16f3d3a..c89159b55e130f 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);
// ...
_______________________________________________
Python-checkins mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3/lists/python-checkins.python.org/
Member address: [email protected]