optimise out extra notify

This commit is contained in:
Greg Wilkins 2013-06-21 13:10:10 +10:00
parent 60828fe8a3
commit 3cd59fe1b8
2 changed files with 23 additions and 2 deletions

View File

@ -498,6 +498,27 @@ public class HttpConnection extends AbstractConnection implements Runnable, Http
*/ */
} }
@Override
public void earlyEOF()
{
synchronized (lock())
{
_inputEOF=true;
_earlyEOF = true;
LOG.debug("{} early EOF", this);
}
}
@Override
public void shutdown()
{
synchronized (lock())
{
_inputEOF=true;
LOG.debug("{} shutdown", this);
}
}
@Override @Override
protected void onAllContentConsumed() protected void onAllContentConsumed()
{ {

View File

@ -43,8 +43,8 @@ public abstract class HttpInput<T> extends ServletInputStream
{ {
private final static Logger LOG = Log.getLogger(HttpInput.class); private final static Logger LOG = Log.getLogger(HttpInput.class);
private final ArrayQueue<T> _inputQ = new ArrayQueue<>(); private final ArrayQueue<T> _inputQ = new ArrayQueue<>();
private boolean _earlyEOF; protected boolean _earlyEOF;
private boolean _inputEOF; protected boolean _inputEOF;
public Object lock() public Object lock()
{ {