equal
deleted
inserted
replaced
1030 } |
1030 } |
1031 |
1031 |
1032 ThreadMXBean threadMXBean = ManagementFactory.getThreadMXBean(); |
1032 ThreadMXBean threadMXBean = ManagementFactory.getThreadMXBean(); |
1033 System.err.println("------ stacktrace dump start ------"); |
1033 System.err.println("------ stacktrace dump start ------"); |
1034 for (ThreadInfo info : threadMXBean.dumpAllThreads(true, true)) { |
1034 for (ThreadInfo info : threadMXBean.dumpAllThreads(true, true)) { |
1035 String name = info.getThreadName(); |
1035 final String name = info.getThreadName(); |
|
1036 String lockName; |
1036 if ("Signal Dispatcher".equals(name)) |
1037 if ("Signal Dispatcher".equals(name)) |
1037 continue; |
1038 continue; |
1038 if ("Reference Handler".equals(name) |
1039 if ("Reference Handler".equals(name) |
1039 && info.getLockName().startsWith("java.lang.ref.Reference$Lock")) |
1040 && (lockName = info.getLockName()) != null |
|
1041 && lockName.startsWith("java.lang.ref.Reference$Lock")) |
1040 continue; |
1042 continue; |
1041 if ("Finalizer".equals(name) |
1043 if ("Finalizer".equals(name) |
1042 && info.getLockName().startsWith("java.lang.ref.ReferenceQueue$Lock")) |
1044 && (lockName = info.getLockName()) != null |
|
1045 && lockName.startsWith("java.lang.ref.ReferenceQueue$Lock")) |
1043 continue; |
1046 continue; |
1044 if ("checkForWedgedTest".equals(name)) |
1047 if ("checkForWedgedTest".equals(name)) |
1045 continue; |
1048 continue; |
1046 System.err.print(info); |
1049 System.err.print(info); |
1047 } |
1050 } |
1781 |
1784 |
1782 /** |
1785 /** |
1783 * A CyclicBarrier that uses timed await and fails with |
1786 * A CyclicBarrier that uses timed await and fails with |
1784 * AssertionFailedErrors instead of throwing checked exceptions. |
1787 * AssertionFailedErrors instead of throwing checked exceptions. |
1785 */ |
1788 */ |
1786 public class CheckedBarrier extends CyclicBarrier { |
1789 public static class CheckedBarrier extends CyclicBarrier { |
1787 public CheckedBarrier(int parties) { super(parties); } |
1790 public CheckedBarrier(int parties) { super(parties); } |
1788 |
1791 |
1789 public int await() { |
1792 public int await() { |
1790 try { |
1793 try { |
1791 return super.await(2 * LONG_DELAY_MS, MILLISECONDS); |
1794 return super.await(2 * LONG_DELAY_MS, MILLISECONDS); |