[Stackless] tracing Stackless events

Andrew Dalke dalke at dalkescientific.com
Fri Dec 21 01:50:42 CET 2007

On Dec 20, 2007, at 11:31 PM, Richard Tew wrote:
> But I would expect that you should know where your tasklets are (in
> the scheduler or on given channels) and even without explicitly
> tracking them you should be to enumerate them.
> # Would need to do this for each thread there are tasklets on.
> t = tm = stackless.getmain()
> l = []
> while t not in l:
>     if t != tm:
>         l.append(t)
>     t = t.next

Thanks.  I didn't know it worked that way.

If this is a cyclic queue, why is it that the test is for all visited  

while t not in l:

instead of checking explicitly for the first element?  That is, why not

t = tm = stackless.getmain()
l = []
while 1:
     t = t.next
     if t is tm:

				dalke at dalkescientific.com

More information about the Stackless mailing list