8000
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 985ec98 commit 13915a3Copy full SHA for 13915a3
Modules/_asynciomodule.c
@@ -33,6 +33,7 @@ static PyObject *asyncio_task_repr_info_func;
33
static PyObject *asyncio_InvalidStateError;
34
static PyObject *asyncio_CancelledError;
35
static PyObject *context_kwname;
36
+static int module_initialized;
37
38
static PyObject *cached_running_holder;
39
static volatile uint64_t cached_running_holder_tsid;
@@ -3254,6 +3255,12 @@ module_init(void)
3254
3255
if (asyncio_mod == NULL) {
3256
goto fail;
3257
}
3258
+ if (module_initialized != 0) {
3259
+ return 0;
3260
+ }
3261
+ else {
3262
+ module_initialized = 1;
3263
3264
3265
current_tasks = PyDict_New();
3266
if (current_tasks == NULL) {
0 commit comments