[Stackless] channel.balance wrong?!

Richard Tew richard.m.tew at gmail.com
Sat Jul 11 04:32:26 CEST 2009

On Sat, Jul 11, 2009 at 2:48 AM, Paul Sijben<sijben at eemvalley.com> wrote:
> I tracked down a bug in my code that occasionally popped up to
> channel.balance being wrong sometimes.
> Some part of my code can not afford to block, so it checks the balance
> wheter it should send something into the channel. If there is a receiver
> waiting on it, that is fed by a send and the sender  will not block. Now
> I find that just occasionally the process stalls because there is a
> receiver waiting but the sender does not send as channel.balance==0
> instead of -1!
> I am running the current 2.6.2 version of stackless
> (Python 2.6.2 Stackless 3.1b3 060516 (python-2.6.2:73804M, Jul  3 2009,
> 11:33:51) )
> Is this issue known, and possibly solved in svn?

This issue is not known.  It is the first someone has even suggested
it might be happening.  During the eight years or so I was at C.C.P.,
I never saw the likes of it.

I would be inclined to believe that there was something wrong with
your logic, rather than the channel code.  And without a reproduction
case, it is unlikely that it will ever be reproduced unfortunately.


More information about the Stackless mailing list