摘要: 丧心病狂,竟有Thread.sleep(0)这种神仙写法? 前言 最近在网上看到了一段代码,让我感到很迷茫。他在代码中使用了 Thread.sleep(0),让线程休眠时间为0秒,具体代码如下。 int i = 0; while (i<10000000) { // business logic //prevent long time gc if (i % 3 阅读全文
posted @ 2022-12-27 22:34 JAVA旭阳 阅读(2881) 评论(5) 推荐(3) 编辑