summaryrefslogtreecommitdiffstats
path: root/Doc/c-api/init.rst
diff options
context:
space:
mode:
authorAntoine Pitrou <solipsis@pitrou.net>2011-01-15 12:21:53 (GMT)
committerAntoine Pitrou <solipsis@pitrou.net>2011-01-15 12:21:53 (GMT)
commit9bf8d1c2284fca2257fb008a30c62cce4ff20d73 (patch)
tree9c7f6d7198ee5ad7dfe84f2c20c529b84fb0934e /Doc/c-api/init.rst
parentf1dfe735b5451a4ff844ecb56679b4ef57194eda (diff)
downloadcpython-9bf8d1c2284fca2257fb008a30c62cce4ff20d73.zip
cpython-9bf8d1c2284fca2257fb008a30c62cce4ff20d73.tar.gz
cpython-9bf8d1c2284fca2257fb008a30c62cce4ff20d73.tar.bz2
Add mention of how to switch interpreters
Diffstat (limited to 'Doc/c-api/init.rst')
-rw-r--r--Doc/c-api/init.rst4
1 files changed, 3 insertions, 1 deletions
diff --git a/Doc/c-api/init.rst b/Doc/c-api/init.rst
index 13759d7..8d793a4 100644
--- a/Doc/c-api/init.rst
+++ b/Doc/c-api/init.rst
@@ -782,7 +782,9 @@ Sub-interpreter support
While in most uses, you will only embed a single Python interpreter, there
are cases where you need to create several independent interpreters in the
same process and perhaps even in the same thread. Sub-interpreters allow
-you to do that.
+you to do that. You can switch between sub-interpreters using the
+:c:func:`PyThreadState_Swap` function. You can create and destroy them
+using the following functions:
.. c:function:: PyThreadState* Py_NewInterpreter()