[Stackless] Example and techdemo of an EVE like stackless (beNice, sleep and watchdog) usage with boost.python.
juho.makinen at gmail.com
Tue Apr 4 21:49:47 CEST 2006
Hello. We have created a similar system what EVE from CPP is using
for our game, Project Xenocide (www.projectxenocide.com, A X-COM remake).
Regarding how hard it was to gather all the needed info and to test different
ways how individual parts work, how the watchdog can be used etc,
I have created a sripped down version of our core python engine library,
which is supposed to serve as an example, to be released back
to the stackless community. :)
The example consists three C++ source files (plus a few headers) and
- Using stackless with Boost.Python.
- Running C++ code as the "main tasklet", inside the stackless context.
- Using Watchdog to run tasklets.
- Using Watchdog to catch tasklets which have ran into infinitive loops,
or are just using too much time.
- Sleeping tasklets for specified amount of time, so that this works
with the Watchdog.
- Storing PyChannelObject and PyTaskletObject inside Boost.Python objects.
The package includes a simple Makefile and it needs stackless python,
boost and boost.python compiled against the stackless python source tree
and headers. The package is available for a limited time at my home server:
(I don't know how long I'm able to host it there, but at least weeks)
I'd like that somebody could download, compile and test if it works as expected,
and maybe submit some feedback. After this, If Richard (or somebody
else) likes so,
this can be imported into the SVN repository, posted (and hosted) to
- Juho Mäkinen, http://www.juhonkoti.net
Stackless mailing list
Stackless at stackless.com
More information about the Stackless