我在下面使用flatMap和toList()获得示例代码。有人能告诉我以下代码是否会挂起? (具有类似方法的实际代码在我的生产环境中挂起),我无法上传我的实际代码,所以我只是提供样本。
Thread 29724: (state = BLOCKED)
- sun.misc.Unsafe.park(boolean, long) @bci=0 (Compiled frame; information may be imprecise)
- java.util.concurrent.locks.LockSupport.park(java.lang.Object) @bci=14, line=175 (Compiled frame)
- java.util.concurrent.locks.AbstractQueuedSynchronizer.parkAndCheckInterrupt() @bci=1, line=836 (Compiled frame)
- java.util.concurrent.locks.AbstractQueuedSynchronizer.doAcquireSharedInterruptibly(int) @bci=72, line=997 (Compiled frame)
- java.util.concurrent.locks.AbstractQueuedSynchronizer.acquireSharedInterruptibly(int) @bci=24, line=1304 (Compiled frame)
- java.util.concurrent.CountDownLatch.await() @bci=5, line=231 (Compiled frame)
- rx.observables.BlockingObservable.blockForSingle(rx.Observable) @bci=46, line=461 (Compiled frame)
- rx.observables.BlockingObservable.single() @bci=8, line=341 (Compiled frame)
这是prod中的线程转储
ageSum.first().getAs[Long](0)/totalEntries
// res6: Long = 2
由于 Pranesh