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 1ac4d02 commit dda68d7Copy full SHA for dda68d7
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;
@@ -3247,6 +3248,12 @@ module_init(void)
3247
3248
if (asyncio_mod == NULL) {
3249
goto fail;
3250
}
3251
+ if (module_initialized != 0) {
3252
+ return 0;
3253
+ }
3254
+ else {
3255
+ module_initialized = 1;
3256
3257
3258
current_tasks = PyDict_New();
3259
if (current_tasks == NULL) {
0 commit comments