[Stackless] Stackless runtime smacking into GIL while a callback is running

Adam Preble adam.preble at gmail.com
Mon Mar 12 15:32:37 CET 2012


On Mon, Mar 12, 2012 at 12:20 AM, Richard Tew <richard.m.tew at gmail.com>wrote:

> On Mon, Mar 12, 2012 at 8:28 AM, Adam Preble <adam.preble at gmail.com>
> wrote:
> > I'm assuming that somehow Stackless didn't get the memo that I stole the
> > interpreter for a moment for another thread.  Is there some special
> rules I
> > need to honor with it when I do this crazy stuff?
>
> The one key thing with respect to Stackless to keep in mind, is that
> tasklets may be composed out of parts of the thread they were created
> on.  This means that if you try and run them on another thread.. I'm
> not sure what happens.  Is it possible that is your problem?  I find
> it a little hard to get a grasp on what you are doing, and exactly
> what problem arises from reading your email unfortunately.
>
> I suppose we should get into the programming legalese of "may be
composed." Is that "must?" I am basically doing what you're pondering I'm
doing.  The declaration of the class happens in the bringup code of the
thread that starts Python and has the Python interpreter.  The callback
arrives from a thread in the C++ runtime.  I suppose since it's enough of a
mystery problem, I can try to doodle something up that's easier to show on
pastebin or something.

I would be dismayed if this were the problem.  From what I could tell, if I
acquired the GIL in conventional Python, then I was in the clear.  What
would be my alternative then for Stackless?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.stackless.com/pipermail/stackless/attachments/20120312/03d76499/attachment.html>


More information about the Stackless mailing list