线程优先级
来源:互联网 发布:员工流失数据 编辑:程序博客网 时间:2024/05/16 06:10
public static final int | MAX_PRIORITY | 10 |
public static final int | MIN_PRIORITY | 1 |
public static final int | NORM_PRIORITY | 5 |
- /**
- * @(#)TestPriority.java
- *
- *
- * @author
- * @version 1.00 2008/10/10
- */
- public class TestPriority {
- public TestPriority() {
- }
- public static void main(String []args)
- {
- T1 t1=new T1();
- T2 t2=new T2();
- t1.setPriority(NORM_PRIORITY+3);
- t2.start();t1.start();
- }
- }
- class T2 extends Thread
- {
- public void run()
- {
- for( int i=0; i<1000; i++)
- System.out.println("-----t2 "+i);
- }
- }
- class T1 extends Thread
- {
- public void run()
- {
- for( int i=0; i<1000; i++)
- System.out.println("t1 "+i);
- }
- }
- 线程优先级
- 线程优先级
- 线程优先级
- 线程优先级
- 线程优先级
- 线程优先级
- 线程优先级
- 线程优先级
- 线程优先级
- 线程优先级
- 线程优先级
- 线程优先级
- 线程优先级
- 线程优先级
- 线程优先级
- 线程优先级
- 线程优先级
- 线程优先级
- C#通讯编程(整理)1
- MFC模态对话框使用中的一个陷阱
- Protocol Buffer Basics: C++
- TCP/UDP通讯
- VB动态调用外部API函数的方法
- 线程优先级
- MB_ADD_RESERVATION_QUANTITIES
- 习题13.4
- CheckQQ是否在线
- 日志文件
- 在CMainFrame::OnCreate中调用SetWindowText无效果的原因
- 据称百度网络交易平台定名“有啊”
- 杀毒软件已“死” 主动防御才是希望
- 请问一下 积分如何获得?