summaryrefslogtreecommitdiffstats
path: root/Python/pythonrun.c
diff options
context:
space:
mode:
authorChristian Heimes <christian@cheimes.de>2007-11-30 14:35:04 (GMT)
committerChristian Heimes <christian@cheimes.de>2007-11-30 14:35:04 (GMT)
commit7d2ff884eeb636fcd30ebd2f9886c4b46e8545bc (patch)
tree464092cc4b9f9ef6b4a32c7fb5d5bfbfb1131c9d /Python/pythonrun.c
parent2e510fb9202977d93cc364e0c661769ea4a8cbbc (diff)
downloadcpython-7d2ff884eeb636fcd30ebd2f9886c4b46e8545bc.zip
cpython-7d2ff884eeb636fcd30ebd2f9886c4b46e8545bc.tar.gz
cpython-7d2ff884eeb636fcd30ebd2f9886c4b46e8545bc.tar.bz2
Merged revisions 59226-59233 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk ........ r59228 | amaury.forgeotdarc | 2007-11-29 21:24:36 +0100 (Thu, 29 Nov 2007) | 4 lines vc2008: Move python.vcproj first in the solution file, so that it becomes the default startup project when opening the file for the first time. ........ r59230 | georg.brandl | 2007-11-30 00:00:03 +0100 (Fri, 30 Nov 2007) | 3 lines Add more examples to the wsgiref docs. From GHOP by Josip Dzolonga. ........ r59231 | amaury.forgeotdarc | 2007-11-30 00:35:25 +0100 (Fri, 30 Nov 2007) | 7 lines Issue #1402: PyInterpreterState_Clear() may still invoke user code (in deallocation of running threads, for example), so the PyGILState_Release() function must still be functional. On the other hand, _PyGILState_Fini() only frees memory, and can be called later. Backport candidate, but only after some experts comment on it. ........
Diffstat (limited to 'Python/pythonrun.c')
-rw-r--r--Python/pythonrun.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/Python/pythonrun.c b/Python/pythonrun.c
index 5766b23..08b0d83 100644
--- a/Python/pythonrun.c
+++ b/Python/pythonrun.c
@@ -467,11 +467,6 @@ Py_Finalize(void)
_Py_PrintReferences(stderr);
#endif /* Py_TRACE_REFS */
- /* Cleanup auto-thread-state */
-#ifdef WITH_THREAD
- _PyGILState_Fini();
-#endif /* WITH_THREAD */
-
/* Clear interpreter state */
PyInterpreterState_Clear(interp);
@@ -483,6 +478,11 @@ Py_Finalize(void)
_PyExc_Fini();
+ /* Cleanup auto-thread-state */
+#ifdef WITH_THREAD
+ _PyGILState_Fini();
+#endif /* WITH_THREAD */
+
/* Delete current thread */
PyThreadState_Swap(NULL);
PyInterpreterState_Delete(interp);