summaryrefslogtreecommitdiffstats
path: root/Modules/threadmodule.c
diff options
context:
space:
mode:
Diffstat (limited to 'Modules/threadmodule.c')
-rw-r--r--Modules/threadmodule.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/Modules/threadmodule.c b/Modules/threadmodule.c
index e0afde5..48f1f36 100644
--- a/Modules/threadmodule.c
+++ b/Modules/threadmodule.c
@@ -204,8 +204,7 @@ t_bootstrap(void *boot_raw)
else
Py_DECREF(res);
PyThreadState_Clear(tstate);
- PyEval_ReleaseThread(tstate);
- PyThreadState_Delete(tstate);
+ PyThreadState_DeleteCurrent();
PyThread_exit_thread();
}