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 <[email protected]> wrote:

From: Richard Tew <[email protected]>
Subject: Re: [Stackless] Basic stackless embedding
To: "The Stackless Python Mailing List" <[email protected]>
Date: Wednesday, 19 January, 2011, 2:39 PM

On Wed, Jan 19, 2011 at 8:49 AM, Andrew Macentire <[email protected]> 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 :-)

Cheers,
Richard.

_______________________________________________
Stackless mailing list
[email protected]
http://www.stackless.com/mailman/listinfo/stackless


_______________________________________________
Stackless mailing list
[email protected]
http://www.stackless.com/mailman/listinfo/stackless

Reply via email to