[Stackless] Basic stackless embedding

Richard Tew richard.m.tew at gmail.com
Wed Jan 19 00:41:12 CET 2011

On Wed, Jan 19, 2011 at 12:30 AM, Andrew Macentire <amacentire at ymail.com> wrote:
> I am replying to my own thread.
> Doing a PyStackless_GetRunCount() shows that 0 tasklets are running and that explains why the st.current is in that state.However, I'm not sure crashing the whole application is the best way for PyStackless_GetCurrent() to behave.
> Also, what contributed to my confusion was that from the PyRun_Simplestring("print stackless.getcurrent()") the return value was 1.I guess I will look further today to see why exactly that is so.

When you execute "getcurrent" in Python, the Python interpreter is
running and a current tasklet is created as part of the process of it
doing so (this is actually the same as the main tasklet).  When you do
it from C, the Python interpreter is not running and there is none.
This is correct behaviour.


More information about the Stackless mailing list