Selector cleanup

Matthias Ernst matthias at mernst.org
Fri Jan 25 19:52:42 UTC 2008


On Jan 25, 2008 2:59 PM, Alan Bateman <Alan.Bateman at sun.com> wrote:

> > I not agree, reading the code, idle set is used when setInterestOps(0)
> > is called.
> > I'm not sure that case is not frequent.

> I've only observed it on a few occasions.

Hmm? I thought a boilerplate selection loop looks more or less like this:

while(true) {
 select();
 for k in selectedKeys: {
   k.setInterestOps(0);    <===========
   pool.execute({
     newInterest = handle(k);
     k.interestOps(newInterest);
   });
 }
}

Matthias



More information about the core-libs-dev mailing list