summaryrefslogtreecommitdiffstats
path: root/Include
diff options
context:
space:
mode:
authorVictor Stinner <vstinner@redhat.com>2019-04-29 09:15:56 (GMT)
committerGitHub <noreply@github.com>2019-04-29 09:15:56 (GMT)
commitb36e5d627d4232a01850707eb78a5067f3fd77f4 (patch)
tree63eb8a0966e7ac1b721f8de5c877d4bc79c6fa58 /Include
parent7a5a1cfe04892351bba8e8d7d21ae2262fa35b67 (diff)
downloadcpython-b36e5d627d4232a01850707eb78a5067f3fd77f4.zip
cpython-b36e5d627d4232a01850707eb78a5067f3fd77f4.tar.gz
cpython-b36e5d627d4232a01850707eb78a5067f3fd77f4.tar.bz2
bpo-36356: Destroy the GIL at exit (GH-12453)
* Add _PyEval_FiniThreads2(). _PyEval_FiniThreads() now only clears the pending lock, whereas _PyEval_FiniThreads2() destroys the GIL. * pymain_free() now calls _PyEval_FiniThreads2(). * Py_FinalizeEx() now calls _PyEval_FiniThreads().
Diffstat (limited to 'Include')
-rw-r--r--Include/ceval.h3
-rw-r--r--Include/internal/pycore_ceval.h3
2 files changed, 3 insertions, 3 deletions
diff --git a/Include/ceval.h b/Include/ceval.h
index 11283c0..98e873d 100644
--- a/Include/ceval.h
+++ b/Include/ceval.h
@@ -192,9 +192,6 @@ PyAPI_FUNC(void) PyEval_RestoreThread(PyThreadState *);
PyAPI_FUNC(int) PyEval_ThreadsInitialized(void);
PyAPI_FUNC(void) PyEval_InitThreads(void);
-#ifndef Py_LIMITED_API
-PyAPI_FUNC(void) _PyEval_FiniThreads(void);
-#endif /* !Py_LIMITED_API */
PyAPI_FUNC(void) PyEval_AcquireLock(void) Py_DEPRECATED(3.2);
PyAPI_FUNC(void) PyEval_ReleaseLock(void) /* Py_DEPRECATED(3.2) */;
PyAPI_FUNC(void) PyEval_AcquireThread(PyThreadState *tstate);
diff --git a/Include/internal/pycore_ceval.h b/Include/internal/pycore_ceval.h
index 0bb19f1..ae3d832 100644
--- a/Include/internal/pycore_ceval.h
+++ b/Include/internal/pycore_ceval.h
@@ -54,6 +54,9 @@ struct _ceval_runtime_state {
PyAPI_FUNC(void) _PyEval_Initialize(struct _ceval_runtime_state *);
+PyAPI_FUNC(void) _PyEval_FiniThreads(void);
+PyAPI_FUNC(void) _PyEval_FiniThreads2(void);
+
#ifdef __cplusplus
}
#endif