equal
deleted
inserted
replaced
65 phaser.arriveAndAwaitAdvance(); |
65 phaser.arriveAndAwaitAdvance(); |
66 equal(Thread.activeCount(), count0 + 2); |
66 equal(Thread.activeCount(), count0 + 2); |
67 e1 = e2 = null; |
67 e1 = e2 = null; |
68 for (int i = 0; i < 10 && Thread.activeCount() > count0; i++) |
68 for (int i = 0; i < 10 && Thread.activeCount() > count0; i++) |
69 tryWaitForFinalizersToRun(); |
69 tryWaitForFinalizersToRun(); |
|
70 for (int i = 0; i < 10; ++i) { // give JVM a chance to settle. |
|
71 if (Thread.activeCount() == count0) |
|
72 return; |
|
73 Thread.sleep(1000); |
|
74 } |
70 equal(Thread.activeCount(), count0); |
75 equal(Thread.activeCount(), count0); |
71 } |
76 } |
72 |
77 |
73 //--------------------- Infrastructure --------------------------- |
78 //--------------------- Infrastructure --------------------------- |
74 static volatile int passed = 0, failed = 0; |
79 static volatile int passed = 0, failed = 0; |