]> granicus.if.org Git - python/commitdiff
Add mention of how to switch interpreters
authorAntoine Pitrou <solipsis@pitrou.net>
Sat, 15 Jan 2011 12:21:53 +0000 (12:21 +0000)
committerAntoine Pitrou <solipsis@pitrou.net>
Sat, 15 Jan 2011 12:21:53 +0000 (12:21 +0000)
Doc/c-api/init.rst

index 13759d783dd6ecce41d4808bd81ea585f370f613..8d793a4fda6d70174eaa8d868849bd511d662b6a 100644 (file)
@@ -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()