[Stackless] Basic stackless embedding
richard.m.tew at gmail.com
Wed Jan 19 13:39:35 CET 2011
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 :-)
More information about the Stackless