[Stackless] Channels between threads

Andrew Francis andrewfr_ice at yahoo.com
Thu Jan 24 22:38:36 CET 2008


Hi Simon:

Not sure if you have solved your problem yet...

>The third from last line seems to suggest their is
>still activity in the channel (1, 6,
>[<stackless.tasklet >object at 0x85452cc>]).

>What does the 1, 6, and tasklet represent in this
>case? 1 is the balance, 6 is ??? and tasklet is the
>listening loop?

No this does not imply activity per se. Rather the
output is saying there is a tasklet connected to that
channel and it is a sender (positive count - sending,
negative - receiving). Also this tasklet will be the
first to be unblocked if there is a receiver.

To see if the application is active, I would do a
stackless.getruncount() to see how many tasklets are
still running (i.e., is the number greater than one?).
Then compare this to the number of tasklets you think
have not finished (runcount() does not include
blocked). 

The reason I asked for __reduce__ is I was trying to
think of scenarios that would reproduce your
behaviour. Perhaps this wasn't useful. When I have
time, I will take another look at your code. 

Cheers,
Andrew



 







      ____________________________________________________________________________________
Looking for last minute shopping deals?  
Find them fast with Yahoo! Search.  http://tools.search.yahoo.com/newsearch/category.php?category=shopping




More information about the Stackless mailing list