[Stackless] (no subject)

Kristján Valur Jónsson kristjan at ccpgames.com
Sat Oct 10 13:15:49 CEST 2009

I must agree with Richard.
However, I have already done this research to a small degree when I was writing code to explore deadlocks in eve.
Here is a snippet that prints out information about a tasklet, this is from a subclass of stackless.tasklet:

def __repr__(self):
        abps = [getattr(self, attr) for attr in ["alive", "blocked", "paused", "scheduled"]]
        abps = "".join(str(int(flag)) for flag in abps)
        return "<TaskletExt object at %x, abps=%s, ctxt=%r>"%(id(self), abps, getattr(self,'storedContext', None))

the documentation for the four attributes is in the source.
blocked paused and scheduled are not independent.
a tasklet can be either blocked or paused, not both.
and if it is, it is not scheduled.

a tasklet that isn't actually running is either blocked, paused, or scheduled.
I can't remember offhand what is the state of a tasklet that is is actually running, perhapse none of the above.
alive has to do with whether it has been started (received initial arguments) and not finished, I think.


> -----Original Message-----
> From: stackless-bounces at stackless.com [mailto:stackless-
> bounces at stackless.com] On Behalf Of Richard Tew
> Sent: 9. október 2009 22:35
> To: Andrew Francis
> Cc: stackless at stackless.com
> Subject: Re: [Stackless] (no subject)
> On Sat, Oct 10, 2009 at 8:59 AM, Andrew Francis
> <andrewfr_ice at yahoo.com> wrote:
> > --- On Fri, 10/9/09, Richard Tew <richard.m.tew at gmail.com> wrote:
> >
> >> It would take you less time to read the source code and
> >> find out for yourself, than it would to write this email and wait
> for
> >> other people to write replies.
> >
> > Yes I could read the source code. I do this as a last resort (i.e,
> channel preferences). By the same token this should really be something
> stated in the documentation. Well that is something I am working on.
> That said, you could just answer the question instead of being snarky.
> >
> > Again I think it is good to ask simple questions so they become a
> part of the over all documentation. Sorry if you agree with that
> philosophy.
> What you have to understand Andrew, is that anyone who answered this
> question would more than likely have to read the source code to make
> sure themselves before they answered.  This is actually a common
> pattern with questions you ask.  So, my answer was not meant to be
> snarky, but rather a literal suggestion about the most straightforward
> path to the information you want.
> Richard.
> _______________________________________________
> Stackless mailing list
> Stackless at stackless.com
> http://www.stackless.com/mailman/listinfo/stackless

More information about the Stackless mailing list