Java线程之yeild()理解

来源:互联网 发布:旋风十一人网络播放量 编辑:程序博客网 时间:2024/06/09 14:28

Although the JDK has 10 priority levels, this doesn’t map well to many operating systems. For example, Windows has 7 priority levels that are not fixed, so the mapping is indeterminate. Sun’s Solaris has 231 levels. The only portable approach is to stick to MAX_PRIORITY, NORM_PRIORITY, and MIN_PRIORITY when you’re adjusting priority levels.