waiting on condition-6ren">
gpt4 book ai didi

java - 如何在java中获取线程NID(Native ID)

转载 作者:行者123 更新时间:2023-11-30 07:56:41 26 4
gpt4 key购买 nike

"remoting-jmx client-thread-4" daemon prio=6 tid=0x000000000f86b000 nid=0x20e0 >waiting on condition [0x000000000b82e000] java.lang.Thread.State: TIMED_WAITING (parking) at sun.misc.Unsafe.park(Native Method) - parking to wait for <0x00000000ebd8bcc0> (a >java.util.concurrent.SynchronousQueue$TransferStack) at java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:226) at >java.util.concurrent.SynchronousQueue$TransferStack.awaitFulfill(SynchronousQue>ue.java:460) at >java.util.concurrent.SynchronousQueue$TransferStack.transfer(SynchronousQueue.j>ava:359) at java.util.concurrent.SynchronousQueue.poll(SynchronousQueue.java:942) at >java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1068) at >java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1130) at >java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:745)

在此线程转储中,我们有线程 Nid。这个Nid我如何从java代码中的线程中获取它。

最佳答案

这是一个gist其中显示了如果您可以包含来自 project lomboklombok.jar,如何获取 NID和来自应用中 JDK 的 sa-jdi.jar

关于java - 如何在java中获取线程NID(Native ID),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32579080/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com