diff options
Diffstat (limited to 'Modules/_testsinglephase.c')
-rw-r--r-- | Modules/_testsinglephase.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/Modules/_testsinglephase.c b/Modules/_testsinglephase.c index ff533e4..c0eb266 100644 --- a/Modules/_testsinglephase.c +++ b/Modules/_testsinglephase.c @@ -471,6 +471,9 @@ init__testsinglephase_basic(PyModuleDef *def) if (module == NULL) { return NULL; } +#ifdef Py_GIL_DISABLED + PyModule_ExperimentalSetGIL(module, Py_MOD_GIL_NOT_USED); +#endif module_state *state = &global_state.module; // It may have been set by a previous run or under a different name. @@ -562,6 +565,9 @@ PyInit__testsinglephase_with_reinit(void) if (module == NULL) { return NULL; } +#ifdef Py_GIL_DISABLED + PyModule_ExperimentalSetGIL(module, Py_MOD_GIL_NOT_USED); +#endif assert(get_module_state(module) == NULL); @@ -624,6 +630,9 @@ PyInit__testsinglephase_with_state(void) if (module == NULL) { return NULL; } +#ifdef Py_GIL_DISABLED + PyModule_ExperimentalSetGIL(module, Py_MOD_GIL_NOT_USED); +#endif module_state *state = get_module_state(module); assert(state != NULL); |