gh-115304: Add doc for initializing PyMutex as a global variable (#115305)

This commit is contained in:
AN Long 2024-02-22 01:35:53 +08:00 committed by GitHub
parent 5f7df88821
commit 87a65a5bd4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 3 additions and 0 deletions

View File

@ -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);
// ...