移除MAX_INVOKER_ONSTACK
This commit is contained in:
@@ -14,7 +14,7 @@ import java.util.concurrent.TimeUnit;
|
|||||||
import java.util.concurrent.atomic.LongAdder;
|
import java.util.concurrent.atomic.LongAdder;
|
||||||
import java.util.function.Consumer;
|
import java.util.function.Consumer;
|
||||||
import javax.net.ssl.SSLContext;
|
import javax.net.ssl.SSLContext;
|
||||||
import org.redkale.util.*;
|
import org.redkale.util.ByteBufferWriter;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
@@ -27,7 +27,7 @@ import org.redkale.util.*;
|
|||||||
*/
|
*/
|
||||||
abstract class AsyncNioConnection extends AsyncConnection {
|
abstract class AsyncNioConnection extends AsyncConnection {
|
||||||
|
|
||||||
protected static final int MAX_INVOKER_ONSTACK = Integer.getInteger("redkale.net.invoker.max.onstack", Utility.cpus());
|
protected static final int MAX_INVOKER_ONSTACK = Integer.getInteger("redkale.net.invoker.max.onstack", 16);
|
||||||
|
|
||||||
final AsyncIOThread connectThread;
|
final AsyncIOThread connectThread;
|
||||||
|
|
||||||
@@ -161,11 +161,12 @@ abstract class AsyncNioConnection extends AsyncConnection {
|
|||||||
} else {
|
} else {
|
||||||
this.readCompletionHandler = handler;
|
this.readCompletionHandler = handler;
|
||||||
}
|
}
|
||||||
if (client) {
|
doRead(this.ioReadThread.inCurrThread());
|
||||||
doRead(this.ioReadThread.inCurrThread());
|
// if (client) {
|
||||||
} else {
|
// doRead(this.ioReadThread.inCurrThread());
|
||||||
doRead(this.ioReadThread.inCurrThread() || currReadInvoker < MAX_INVOKER_ONSTACK); //同一线程中Selector.wakeup无效
|
// } else {
|
||||||
}
|
// doRead(this.ioReadThread.inCurrThread() || currReadInvoker < MAX_INVOKER_ONSTACK); //同一线程中Selector.wakeup无效
|
||||||
|
// }
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
Reference in New Issue
Block a user