[Stackless] channel.balance wrong?!
richard.m.tew at gmail.com
Sat Jul 11 11:19:20 CEST 2009
On Sat, Jul 11, 2009 at 6:53 PM, Chris Jacobson<mainecoon at gmail.com> wrote:
> I can think of at least one situation when this could occur, involving
> Channel Preference of 1 (Sender):
> Channel N is created with preference 1
> Tasklet A and B start
> Tasklet A runs, receives on N, and blocks
> Tasklet B sees N has balance -1, so sends to N. Due to Preference, B will
> not yield, instead A is placed at end of runnables queue. The channel's
> balance is now 0.
> Tasklet B continues running, sees N has a balance of 0, so does not send.
> Repeat ad infinitum. Tasklet B never explicitly schedules or gets blocked
> otherwise, and so A never wakes up.
More information about the Stackless