1 Thread.currentThread().setPriority(Thread.MAX_PRIORITY);//高优先级
2 
3 Thread.currentThread().setPriority(Thread.MIN_PRIORITY);//低优先级

设置优先级时应该通过currentThread()来获取当前的Thread对象,以此Thread对象调用setPriority()来设置优先级;

posted on 2016-09-25 01:15  呵呵呱呱嘎嘎哒  阅读(240)  评论(0)    收藏  举报