gpt4 book ai didi

java - TIMED_WAITING 线程标记为可运行

转载 作者:行者123 更新时间:2023-11-29 09:30:31 27 4
gpt4 key购买 nike

我有一个线程转储,其中有:

"http-9443-67" daemon prio=10 tid=0x00007f1d5c37e800 nid=0x10331 runnable [0x00007f1d50da9000]
java.lang.Thread.State: TIMED_WAITING (parking)
at sun.misc.Unsafe.park(Native Method)
- parking to wait for <0x000000032e818150> (a java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject)
at java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:196)
at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos(AbstractQueuedSynchronizer.java:2025)
at java.util.concurrent.LinkedBlockingDeque.pollFirst(LinkedBlockingDeque.java:470)
at java.util.concurrent.LinkedBlockingDeque.poll(LinkedBlockingDeque.java:633)
at ...

"http-9443-69" daemon prio=10 tid=0x00007f1d5c8a1000 nid=0x10333 waiting on condition [0x00007f1d511af000]
java.lang.Thread.State: TIMED_WAITING (parking)
at sun.misc.Unsafe.park(Native Method)
- parking to wait for <0x0000000326940d48> (a java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject)
at java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:196)
at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos(AbstractQueuedSynchronizer.java:2025)
at java.util.concurrent.LinkedBlockingDeque.pollFirst(LinkedBlockingDeque.java:470)
at java.util.concurrent.LinkedBlockingDeque.poll(LinkedBlockingDeque.java:633)
at ...

它们处于 TIMED_WAITING 状态。

但是:

  • http-9443-67 被标记为可运行
  • http-9443-69 被标记为等待条件

你知道这是什么意思吗?

最佳答案

线程由于调用 wait() 而停止执行,并在调用“notify()”时恢复执行

关于java - TIMED_WAITING 线程标记为可运行,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17594191/

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