diff --git a/Doc/Manual/Contents.html b/Doc/Manual/Contents.html index f196da53c..56afca857 100644 --- a/Doc/Manual/Contents.html +++ b/Doc/Manual/Contents.html @@ -1614,6 +1614,11 @@
For each class that has directors enabled, SWIG generates a new class that derives from both the class in question and a special @@ -6737,6 +6734,7 @@ prohibiting it.
By default, SWIG does not enable support for multithreaded Python applications. More specifically, the Python wrappers generated by SWIG will not release the Python's interpreter's Global Interpreter Lock (GIL) when wrapped C/C++ code is @@ -6751,43 +6749,56 @@ will not be able to run any other threads, even if the wrapped C/C++ code is wai
The user interface is as follows:
Module thread support can be enabled in two ways:
++ The -threads swig python option at the command line (or in setup.py): +
+$ swig -python -threads example.i
+ The threads module option in the *.i template file: +
+%feature("nothread") method;You can disable thread support for a given method:
+%module("threads"=1)%nothread method;
You can partially disable thread support for a given method:
+To disable the C++/python thread protection:
+%feature("nothreadblock") method;%nothreadblock method;
To disable the python/C++ thread protection
+%feature("nothreadallow") method;%nothreadallow method;
For the curious about performance, here are some numbers for the profiletest.i test, which is used to check the speed of the wrapped code:
-| Thread Mode | Execution Time (sec) |
|---|