Embedding: Is it possible to limit number of virtual instructions executed?

2008-10-31 Thread juliangrendell
Hi experts- I have a potential use case of embedding Python where it must co- operate with the host c/c++ application in a single thread. That is, the c code and python interpreter need to cooperate and time share, or yield to each other. The main loop would need to do something like: check for

Re: Embedding: Is it possible to limit number of virtual instructions executed?

2008-11-03 Thread juliangrendell
Thanks to those who replied; it seems that it is possible to do, but would require some changes to the python core, and may not be as fine-grained as I'd presumed. I think I'll consider running python in a seperate thread and create a couple of message queues to/from that thread and the main threa