summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorAntoine Pitrou <solipsis@pitrou.net>2009-10-27 12:48:52 (GMT)
committerAntoine Pitrou <solipsis@pitrou.net>2009-10-27 12:48:52 (GMT)
commit9aece75269872fa5cb942fb5ba642531de2d09fe (patch)
treeca8558eb2528580bd2eb07076be44a08a5ea54c9 /Modules
parentf75774b5420e18264fcf0cd0a845f4f7377b74b7 (diff)
downloadcpython-9aece75269872fa5cb942fb5ba642531de2d09fe.zip
cpython-9aece75269872fa5cb942fb5ba642531de2d09fe.tar.gz
cpython-9aece75269872fa5cb942fb5ba642531de2d09fe.tar.bz2
Merged revisions 75570,75574,75624 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk ........ r75570 | antoine.pitrou | 2009-10-20 23:29:37 +0200 (mar., 20 oct. 2009) | 6 lines Issue #1722344: threading._shutdown() is now called in Py_Finalize(), which fixes the problem of some exceptions being thrown at shutdown when the interpreter is killed. Patch by Adam Olsen. ........ r75574 | antoine.pitrou | 2009-10-20 23:59:25 +0200 (mar., 20 oct. 2009) | 4 lines Test wouldn't work in debug mode. We probably need a function in test_support to handle this. ........ r75624 | antoine.pitrou | 2009-10-23 14:01:13 +0200 (ven., 23 oct. 2009) | 3 lines Fix Windows buildbot failure ........
Diffstat (limited to 'Modules')
-rw-r--r--Modules/main.c29
1 files changed, 0 insertions, 29 deletions
diff --git a/Modules/main.c b/Modules/main.c
index 1a58071..2d2bbf4 100644
--- a/Modules/main.c
+++ b/Modules/main.c
@@ -222,33 +222,6 @@ static int RunMainFromImporter(char *filename)
}
-/* Wait until threading._shutdown completes, provided
- the threading module was imported in the first place.
- The shutdown routine will wait until all non-daemon
- "threading" threads have completed. */
-#include "abstract.h"
-static void
-WaitForThreadShutdown(void)
-{
-#ifdef WITH_THREAD
- PyObject *result;
- PyThreadState *tstate = PyThreadState_GET();
- PyObject *threading = PyMapping_GetItemString(tstate->interp->modules,
- "threading");
- if (threading == NULL) {
- /* threading not imported */
- PyErr_Clear();
- return;
- }
- result = PyObject_CallMethod(threading, "_shutdown", "");
- if (result == NULL)
- PyErr_WriteUnraisable(threading);
- else
- Py_DECREF(result);
- Py_DECREF(threading);
-#endif
-}
-
/* Main program */
int
@@ -620,8 +593,6 @@ Py_Main(int argc, char **argv)
sts = PyRun_AnyFileFlags(stdin, "<stdin>", &cf) != 0;
}
- WaitForThreadShutdown();
-
Py_Finalize();
#ifdef RISCOS
if (Py_RISCOSWimpFlag)