mirror of
https://github.com/python/cpython.git
synced 2025-10-29 09:29:26 +00:00
gh-115304: Add doc for initializing PyMutex as a global variable (#115305)
This commit is contained in:
parent
5f7df88821
commit
87a65a5bd4
1 changed files with 3 additions and 0 deletions
|
|
@ -26,6 +26,9 @@ extern "C" {
|
||||||
// Typical initialization:
|
// Typical initialization:
|
||||||
// PyMutex m = (PyMutex){0};
|
// PyMutex m = (PyMutex){0};
|
||||||
//
|
//
|
||||||
|
// Or initialize as global variables:
|
||||||
|
// static PyMutex m;
|
||||||
|
//
|
||||||
// Typical usage:
|
// Typical usage:
|
||||||
// PyMutex_Lock(&m);
|
// PyMutex_Lock(&m);
|
||||||
// ...
|
// ...
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue