prevent spin by write blocked from non dispatched thread
This commit is contained in:
parent
584bbd4bce
commit
f70ed3ac21
|
@ -162,6 +162,8 @@ public class SelectChannelEndPoint extends ChannelEndPoint implements AsyncEndPo
|
|||
|
||||
// we are not interested in further selecting
|
||||
_key.interestOps(0);
|
||||
if (!_dispatched)
|
||||
updateKey();
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -585,15 +585,6 @@ public abstract class SelectorManager extends AbstractLifeCycle implements Dumpa
|
|||
// Log and dump some status
|
||||
_paused=true;
|
||||
LOG.warn("Selector {} is too busy, pausing!",this);
|
||||
final SelectSet set = this;
|
||||
SelectorManager.this.dispatch(
|
||||
new Runnable(){
|
||||
public void run()
|
||||
{
|
||||
System.err.println(set+":\n"+set.dump());
|
||||
}
|
||||
public String toString() {return "Dump-"+super.toString();}
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -991,6 +982,16 @@ public abstract class SelectorManager extends AbstractLifeCycle implements Dumpa
|
|||
dumpto.add(key.attachment()+" - - ");
|
||||
}
|
||||
}
|
||||
|
||||
/* ------------------------------------------------------------ */
|
||||
public String toString()
|
||||
{
|
||||
String s=super.toString()+" "+SelectorManager.this.getState();
|
||||
Selector selector=_selector;
|
||||
if (selector!=null && selector.isOpen())
|
||||
s+=",k="+selector.keys().size()+",s="+selector.selectedKeys().size();
|
||||
return s;
|
||||
}
|
||||
}
|
||||
|
||||
/* ------------------------------------------------------------ */
|
||||
|
|
Loading…
Reference in New Issue