TWO
11-01-2011 10:16:58
I do not use PyOgre directly duo to no support for version 3.1, but this might be the best place to ask this question.
I switched to stackless some time ago and i'm very happy with it. Now one thing has bugged me all the time. I use alternative be_nice scheduling ala eve o. I expect the first py file to be the main tasklet, running as long as the program is active and updating systems. This seems to be not exactly true.
application.py (the main file)
That works well, red is a Cpp extension providing Ogre, Opcode, ... and the update function is what you expect it to be. At some random point (while killing a tasklet) i get "RuntimeError: Deadlock: the last runnable tasklet cannot be blocked." So application.run is not considered the main tasklet? But when I create some wrapper like red.run_main(application.run) where red.run_main equals PyStackless_CallMethod_Main the exception "call_main: cant run main from main tasklet whatever ..." is printed.
Long story short: I need a main tasklet to run all the time without _embedding_ stackless. Note that I use the benice scheduling method.
Thanks for any hints.
I switched to stackless some time ago and i'm very happy with it. Now one thing has bugged me all the time. I use alternative be_nice scheduling ala eve o. I expect the first py file to be the main tasklet, running as long as the program is active and updating systems. This seems to be not exactly true.
application.py (the main file)
def run(port, node_id):
...
sync.Tasklet(setup.register_at_mas)(config)
while True:
red.update()
run(...)
That works well, red is a Cpp extension providing Ogre, Opcode, ... and the update function is what you expect it to be. At some random point (while killing a tasklet) i get "RuntimeError: Deadlock: the last runnable tasklet cannot be blocked." So application.run is not considered the main tasklet? But when I create some wrapper like red.run_main(application.run) where red.run_main equals PyStackless_CallMethod_Main the exception "call_main: cant run main from main tasklet whatever ..." is printed.
Long story short: I need a main tasklet to run all the time without _embedding_ stackless. Note that I use the benice scheduling method.
Thanks for any hints.