How can i run PyObject_CallObject() twice, In the case Embedding Python in C++?

Viewed 27

Although the task of embedding Python in a c++ environment has been successful, but, there is one problem.

It takes more than 30 minutes to execute function A developed by python code through the PyObject_CallObject() function.

I want to develop a function B that stops function A execution while function A is running. PyObject_CallObject() runs inside the C++ thread.

It was confirmed that the PyObject_CallObject() function was not executed at the same time. How can I change m_bStop variable to True when the "diexp_fit" function is running?

enter image description here

0 Answers
Related