Skip to content

Commit 87a65a5

Browse files
authored
gh-115304: Add doc for initializing PyMutex as a global variable (#115305)
1 parent 5f7df88 commit 87a65a5

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

Include/internal/pycore_lock.h

+3
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,9 @@ extern "C" {
2626
// Typical initialization:
2727
// PyMutex m = (PyMutex){0};
2828
//
29+
// Or initialize as global variables:
30+
// static PyMutex m;
31+
//
2932
// Typical usage:
3033
// PyMutex_Lock(&m);
3134
// ...

0 commit comments

Comments
 (0)