From 18d7df5efd3d4e01e644dc693518629fe3a6832a Mon Sep 17 00:00:00 2001 From: Dustin Spicuzza Date: Tue, 31 Jan 2017 10:55:16 -0500 Subject: [PATCH] Documentation: explicitly call out that the GIL is held (#615) --- docs/advanced/misc.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/advanced/misc.rst b/docs/advanced/misc.rst index c13df7bf8..163fb0ee9 100644 --- a/docs/advanced/misc.rst +++ b/docs/advanced/misc.rst @@ -19,6 +19,7 @@ another name and use it in the macro to avoid this problem. Global Interpreter Lock (GIL) ============================= +When calling a C++ function from Python, the GIL is always held. The classes :class:`gil_scoped_release` and :class:`gil_scoped_acquire` can be used to acquire and release the global interpreter lock in the body of a C++ function call. In this way, long-running C++ code can be parallelized using