如何调试阻塞的Future.get()调用?

时间:2016-10-14 01:04:04

标签: java concurrency future

我有一个等待Future.get()方法的代码,它永远不会返回。我生成了一个线程转储,表明它正在等待另一个线程< 0x000000075e538dd0>。当我尝试使用该线程ID搜索线程时,我找不到任何记录这告诉我什么?

"Reader #9[worker][-1f2e83ef:1579b13caa9:-722e][AttributeJoinCollator]" #512 prio=5 os_prio=0 tid=0x000000002254f800 nid=0x7374 waiting on condition     [0x00000000427ae000]
java.lang.Thread.State: WAITING (parking)
at sun.misc.Unsafe.park(Native Method)
- parking to wait for  <0x000000075e538dd0> (a         java.util.concurrent.FutureTask)
at java.util.concurrent.locks.LockSupport.park(LockSupport.java:175)
at java.util.concurrent.FutureTask.awaitDone(FutureTask.java:429)
at java.util.concurrent.FutureTask.get(FutureTask.java:191)
at my.code.here(MyClass.java:416)

0 个答案:

没有答案