@Test public void testParkUntil() { out.println("启动测试"); long start = System.currentTimeMillis(); LockSupport.parkUntil(TimeUnit.SECONDS.toMillis(6) + start); long end = System.currentTimeMillis() - start; out.println(TimeUnit.MILLISECONDS.toSeconds(end) + "秒后结束测试测试"); }
public static void parkUntil(Object blocker, long deadline) { Thread t = Thread.currentThread(); setBlocker(t, blocker); UNSAFE.park(true, deadline); setBlocker(t, null); }
LockSupport { public static void parkUntil(Object blocker, long deadline) { Thread t = Thread.currentThread(); setBlocker(t, blocker); UNSAFE.park(true, deadline); setBlocker(t, null); } }
LockSupport { public static void parkUntil(Object blocker, long deadline) { Thread t = Thread.currentThread(); setBlocker(t, blocker); UNSAFE.park(true, deadline); setBlocker(t, null); } private  LockSupport(); }
LockSupport { public static void parkUntil(Object blocker, long deadline) { Thread t = Thread.currentThread(); setBlocker(t, blocker); UNSAFE.park(true, deadline); setBlocker(t, null); } private  LockSupport(); static void unpark(Thread thread); static void park(Object blocker); static void parkNanos(Object blocker, long nanos); static void parkUntil(Object blocker, long deadline); static Object getBlocker(Thread t); static void park(); static void parkNanos(long nanos); static void parkUntil(long deadline); }
LockSupport { public static void parkUntil(Object blocker, long deadline) { Thread t = Thread.currentThread(); setBlocker(t, blocker); UNSAFE.park(true, deadline); setBlocker(t, null); } private  LockSupport(); static void unpark(Thread thread); static void park(Object blocker); static void parkNanos(Object blocker, long nanos); static void parkUntil(Object blocker, long deadline); static Object getBlocker(Thread t); static void park(); static void parkNanos(long nanos); static void parkUntil(long deadline);  }