Thread.sleep()关于让不让出cpu时间片

1.证实 思路:反证法。假如Thread.sleep(),不让出cpu时间片,建立1000个线程,每一个线程执行sleep()方法。则cpu的使用率必定很高,贴上代码:html public static void main(String[] args) { class Worker extends Thread { public void run()
相关文章
相关标签/搜索