<table cellspacing="0" cellpadding="0" border="0" ><tr><td valign="top" style="font: inherit;">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 :)<br><br>--- On <b>Wed, 19/1/11, Richard Tew <i><richard.m.tew@gmail.com></i></b> wrote:<br><blockquote style="border-left: 2px solid rgb(16, 16, 255); margin-left: 5px; padding-left: 5px;"><br>From: Richard Tew <richard.m.tew@gmail.com><br>Subject: Re: [Stackless] Basic stackless embedding<br>To: "The Stackless Python Mailing List" <stackless@stackless.com><br>Date: Wednesday,
19 January, 2011, 2:39 PM<br><br><div class="plainMail">On Wed, Jan 19, 2011 at 8:49 AM, Andrew Macentire <<a ymailto="mailto:amacentire@ymail.com" href="/mc/compose?to=amacentire@ymail.com">amacentire@ymail.com</a>> wrote:<br>><br>> 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.<br>> 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.<br><br>I don't think it matters. The function should only be used in the<br>right context, and this wasn't the right context. With proper<br>documentation on use of the C API, this problem would go away. And<br>the C
API really needs documentation - but that said, you are the<br>first to encounter this :-)<br><br>Cheers,<br>Richard.<br><br>_______________________________________________<br>Stackless mailing list<br><a ymailto="mailto:Stackless@stackless.com" href="/mc/compose?to=Stackless@stackless.com">Stackless@stackless.com</a><br><a href="http://www.stackless.com/mailman/listinfo/stackless" target="_blank">http://www.stackless.com/mailman/listinfo/stackless</a><br></div></blockquote></td></tr></table><br>