Java"s NIO is Synchronize non-blocking, but why is its core Selector.select () blocking? Is it not contradictory?
Selector selector = Selector.open();
while (true) {
int nReady = selector.select(); //
Set<SelectionKey> keys = selector.selectedKeys();
Iterator<SelectionKey> it = keys.iterator();
//...
}