title: How do we know if python code is in never ending loop in c or c++?
body: <p>I am embedding Python interpreter in C/C++ code. If the python code is in never-ending loop, it is possible to say the application crashes because you can not terminate the c++ code. So My question is how do I know if the python code is in a never-ending loop so that I can return the execution of the code back to c++ side?</p>