huangyiming
huangyiming
在用NIO的时候也遇到了此问题,大量cpu: "$_NIOREACTOR-0-RW" #27 prio=5 os_prio=0 tid=0x00007f3e14102000 nid=0xb6d runnable [0x00007f3e7471c000] java.lang.Thread.State: RUNNABLE at sun.nio.ch.EPollArrayWrapper.epollWait(Native Method) at sun.nio.ch.EPollArrayWrapper.poll(EPollArrayWrapper.java:269) at sun.nio.ch.EPollSelectorImpl.doSelect(EPollSelectorImpl.java:93) at sun.nio.ch.SelectorImpl.lockAndDoSelect(SelectorImpl.java:86) - locked (a sun.nio.ch.Util$3) - locked (a java.util.Collections$UnmodifiableSet) - locked...
> thank you reply,we just add builder pattern in set method,and return it self replace no return , Theoretically it can not lead to breaking changes (of API)