[Python-checkins] bpo-44434: Remove useless calls to PyThread_exit_thread() (GH-26943)

vstinner webhook-mailer at python.org
Mon Jun 28 20:03:43 EDT 2021


https://github.com/python/cpython/commit/48e3a1d95aee013974121fcafe19816c0e9a41da
commit: 48e3a1d95aee013974121fcafe19816c0e9a41da
branch: main
author: Victor Stinner <vstinner at python.org>
committer: vstinner <vstinner at python.org>
date: 2021-06-29T02:03:30+02:00
summary:

bpo-44434: Remove useless calls to PyThread_exit_thread() (GH-26943)

Remove useless calls to PyThread_exit_thread() in two unit tests of
_testcapi and _testembed modules.

Co-authored-by: Alexey Izbyshev <izbyshev at ispras.ru>

files:
M Modules/_testcapimodule.c
M Programs/_testembed.c

diff --git a/Modules/_testcapimodule.c b/Modules/_testcapimodule.c
index b983deeac6aafb..7ac0e84d2efb0d 100644
--- a/Modules/_testcapimodule.c
+++ b/Modules/_testcapimodule.c
@@ -4300,8 +4300,6 @@ temporary_c_thread(void *data)
     PyGILState_Release(state);
 
     PyThread_release_lock(test_c_thread->exit_event);
-
-    PyThread_exit_thread();
 }
 
 static PyObject *
diff --git a/Programs/_testembed.c b/Programs/_testembed.c
index d963cb3dc7e20e..64a8714db02f3c 100644
--- a/Programs/_testembed.c
+++ b/Programs/_testembed.c
@@ -269,8 +269,6 @@ static void bpo20891_thread(void *lockp)
     PyGILState_Release(state);
 
     PyThread_release_lock(lock);
-
-    PyThread_exit_thread();
 }
 
 static int test_bpo20891(void)



More information about the Python-checkins mailing list