summaryrefslogtreecommitdiff
path: root/Modules/threadmodule.c
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>2001-01-23 01:47:18 +0000
committerGuido van Rossum <guido@python.org>2001-01-23 01:47:18 +0000
commit8d3da7f9109104f30aa474d5618a7aa4ad442e3d (patch)
tree7f039add43fdc3fcefc874c4b31c57d10bf34697 /Modules/threadmodule.c
parent8ea2265b0da031a92be3332d1aa934ea2f13b834 (diff)
downloadcpython-8d3da7f9109104f30aa474d5618a7aa4ad442e3d.tar.gz
Use PyThreadState_DeleteCurrent() instead of PyThreadState_Delete()
and PyEval_ReleaseThread(). This fixes SF bug #125673 PyThreadState_Delete: invalid tstate (Unix only?).
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 e0afde5ea9..48f1f36cda 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();
}