Embedding python with a C++ multithread apps -> pause and resume python script
stsolakos at patras.atmel.com
Tue Sep 10 11:35:45 CEST 2002
I have had the same problem, and I had to do some kind of trick. I had also had a problem with the CPU usage, since when such a script had been running, the CPU usage touched 100%.
My question : I still do not know why. Does anybody?
Anyway, I have used the sys.settrace method. Each time a line of Python code is executed, my OnTrace C++ function is being called. I use yield to lower the CPU usage. You may check if the thread that called it has to pause, an dyou may pause it till it is resumed. Just an idea.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Python-list