Remove selector spinning optimization
This commit is contained in:
parent
e2d69120bb
commit
778fbc36a9
@ -47,11 +47,6 @@ final class SelectorUtil {
|
|||||||
|
|
||||||
static void select(Selector selector) throws IOException {
|
static void select(Selector selector) throws IOException {
|
||||||
try {
|
try {
|
||||||
for (int i = 0; i < 32; i ++) {
|
|
||||||
if (selector.selectNow() > 0) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
selector.select(10);
|
selector.select(10);
|
||||||
} catch (CancelledKeyException e) {
|
} catch (CancelledKeyException e) {
|
||||||
if (logger.isDebugEnabled()) {
|
if (logger.isDebugEnabled()) {
|
||||||
|
Loading…
Reference in New Issue
Block a user