[Stackless] Basic stackless embedding

Andrew Macentire amacentire at ymail.com
Wed Jan 19 14:44:58 CET 2011

Yes, you're right.And I would love to have more documentation an the C API and the internals of the implementation of stackless.I'm not a great programmer and takes me a lot of time to crawl through the sources, but was really surprised about how much happens at just the call of Py_Initialize().I understood some of what's being done, up to a certain depth level.I will have to keep looking to try to understand the rest.Hopefully not many very dumb questions will arise :)

--- On Wed, 19/1/11, Richard Tew <richard.m.tew at gmail.com> wrote:

From: Richard Tew <richard.m.tew at gmail.com>
Subject: Re: [Stackless] Basic stackless embedding
To: "The Stackless Python Mailing List" <stackless at stackless.com>
Date: Wednesday, 19 January, 2011, 2:39 PM

On Wed, Jan 19, 2011 at 8:49 AM, Andrew Macentire <amacentire at ymail.com> wrote:
> Hello and thank you for your answer.That is what I thought after noticing the 0 runcount when called from the C API against the 1 runcount result from the called interpreter.Your answer clarifies what happens.
> The only question I still have if it's desirable for the PyStackless_GetCurrent() to crash when there are not running tasklets.I don't know if there is any sane scenario in which it gets called while there are no running tasklets, but then again my experience lacks.

I don't think it matters.  The function should only be used in the
right context, and this wasn't the right context.  With proper
documentation on use of the C API, this problem would go away.  And
the C API really needs documentation - but that said, you are the
first to encounter this :-)


Stackless mailing list
Stackless at stackless.com

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.stackless.com/pipermail/stackless/attachments/20110119/169a2b49/attachment.html>

More information about the Stackless mailing list