コード例 #1
0
ファイル: Main.java プロジェクト: Daemonceltics/Dalvik-VM
  static void b2302318Test() {
    System.gc();

    SpinThread slow = new SpinThread(Thread.MIN_PRIORITY);
    SpinThread fast1 = new SpinThread(Thread.NORM_PRIORITY);
    SpinThread fast2 = new SpinThread(Thread.MAX_PRIORITY);

    slow.setDaemon(true);
    fast1.setDaemon(true);
    fast2.setDaemon(true);

    fast2.start();
    slow.start();
    fast1.start();
    try {
      Thread.sleep(3000);
    } catch (InterruptedException ie) {
      /*ignore */
    }
    System.gc();

    System.out.println("b2302318 passes");
  }