优化doWrite
This commit is contained in:
@@ -192,7 +192,7 @@ abstract class AsyncNioConnection extends AsyncConnection {
|
|||||||
newHandler.handler(handler, null); // new AsyncNioCompletionHandler(handler, null);
|
newHandler.handler(handler, null); // new AsyncNioCompletionHandler(handler, null);
|
||||||
this.writeCompletionHandler = newHandler;
|
this.writeCompletionHandler = newHandler;
|
||||||
}
|
}
|
||||||
doWrite(this.ioWriteThread.inCurrThread()); //如果不是true,则bodyCallback的执行可能会切换线程
|
doWrite(true); //如果不是true,则bodyCallback的执行可能会切换线程
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -218,7 +218,7 @@ abstract class AsyncNioConnection extends AsyncConnection {
|
|||||||
} else {
|
} else {
|
||||||
this.writeCompletionHandler = (CompletionHandler) handler;
|
this.writeCompletionHandler = (CompletionHandler) handler;
|
||||||
}
|
}
|
||||||
doWrite(this.ioWriteThread.inCurrThread());
|
doWrite(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -246,7 +246,7 @@ abstract class AsyncNioConnection extends AsyncConnection {
|
|||||||
} else {
|
} else {
|
||||||
this.writeCompletionHandler = (CompletionHandler) handler;
|
this.writeCompletionHandler = (CompletionHandler) handler;
|
||||||
}
|
}
|
||||||
doWrite(this.ioWriteThread.inCurrThread());
|
doWrite(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void doRead(boolean direct) {
|
public void doRead(boolean direct) {
|
||||||
|
|||||||
Reference in New Issue
Block a user