前言 今天看netty的源码,发现netty写无限循环喜欢用for(; ; ),例如io.netty.channel.nio.NioEventLoop里run方法的实现: protected void run() { for (;;) { try { try { switch (selectStrategy.calculateStrategy(selectNowSupplier, hasTasks())) { case SelectStrategy.CONTINUE