<div dir="ltr"><div class="gmail_extra">Hello<br><br></div><div class="gmail_extra">you may have noticed, the option is not VTK_NO_PYTHON, but VTK_NO_PYTHON_THREAD<br><br></div><div class="gmail_extra">When
this option is true, all python threading is disabled, and all python
related method are executed in one and only thread, no python thread
support.<br></div><div class="gmail_extra">If this option is false, a new option appear, VTK_PYTHON_FULL_THREADSAFE.<br><br>VTK_NO_PYTHON_THREAD false and VTK_PYTHON_FULL_THREADSAFE false is basically the standard way to compile VTK with python.<br><br></div><div class="gmail_extra">If
you pass VTK_PYTHON_FULL_THREADSAFE to true, then each and every call
to python will be protected with GIL [1], ensuring that you can have eg.
other python interpreter in your application<br></div><div class="gmail_extra">and
still use python wrapping in vtk. Very usefull option for specific
usage but quite an overhead for people that have no use for it and only
use python inside VTK.<br><br></div><div class="gmail_extra">on a side
note, The logic in vtkPython.h is quite complicated because even without
VTK_PYTHON_FULL_THREADSAFE, we sometimes needs to protect the python
call with gil anyway, hence the "FULL" in the option name. </div><br>I hope it is more clear now.<br>Regards,<br><br>Mathieu Westphal<br><br>[1] : <a target="_blank" href="https://en.wikipedia.org/wiki/Global_interpreter_lock">https://en.wikipedia.org/wiki/<wbr>Global_interpreter_lock</a></div><div class="gmail_extra"><br clear="all"><div><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr">Mathieu Westphal<br></div></div></div>
<br><div class="gmail_quote">On Thu, Sep 1, 2016 at 5:58 PM, Chris Harris <span dir="ltr"><<a href="mailto:chris.harris@kitware.com" target="_blank">chris.harris@kitware.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Can someone clear up what these two CMake options are for? It seems the ParaView has VTK_PYTHON_FULL_THREADSAFE as a dependant option that can only be enable if VTK_NO_PYTHON is off.<div><br></div><div>I am asking because I would like to know which should be used to selectively compile GIL locks and releases.</div><div><br></div><div>It seems that VTK_NO_PYTHON is used here:</div><div><br></div><div><a href="https://github.com/Kitware/VTK/blob/master/Utilities/Python/vtkPython.h#L107-L112" target="_blank">https://github.com/Kitware/<wbr>VTK/blob/master/Utilities/<wbr>Python/vtkPython.h#L107-L112</a><br></div><div><br></div><div>and</div><div><br></div><div>VTK_PYTHON_FULL_THREADSAFE is used here:<br></div><div><br></div><div><a href="https://github.com/Kitware/VTK/blob/master/Utilities/Python/vtkPython.h#L131-L134" target="_blank">https://github.com/Kitware/<wbr>VTK/blob/master/Utilities/<wbr>Python/vtkPython.h#L131-L134</a><br></div><div><br></div><div><br></div><div>It seems the VTK_PYTHON_FULL_THREADSAFE was added relatively recently.</div><div><br></div><div>Thanks, <span class="HOEnZb"><font color="#888888"><br></font></span></div><span class="HOEnZb"><font color="#888888"><div><br></div><div><br></div><div>Chris</div></font></span></div>
<br>______________________________<wbr>_________________<br>
Powered by <a href="http://www.kitware.com" rel="noreferrer" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" rel="noreferrer" target="_blank">http://www.kitware.com/<wbr>opensource/opensource.html</a><br>
<br>
Search the list archives at: <a href="http://markmail.org/search/?q=Paraview-developers" rel="noreferrer" target="_blank">http://markmail.org/search/?q=<wbr>Paraview-developers</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://public.kitware.com/mailman/listinfo/paraview-developers" rel="noreferrer" target="_blank">http://public.kitware.com/<wbr>mailman/listinfo/paraview-<wbr>developers</a><br>
<br></blockquote></div><br></div>