okio: SegmentPool blocked
Hello,
I see a strange picture in a running jcmd Thread.print on my server app using okio 2.5.0, many threads are blocking during parallel decoding:
java.lang.Thread.State: BLOCKED (on object monitor)
at okio.SegmentPool.recycle(SegmentPool.kt:64)
- waiting to lock <0x00000002cf4f3c78> (a okio.SegmentPool)
In source code for SegmentPool there are @ThreadLocal
and synchronized(this)
at the same time.
So, how does that pool intended to work?
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Comments: 19 (19 by maintainers)
Ok, I’ll check it in a day or 2;
Another idea is to group 2 atomics into 1
@rewlad that’s a mistake. Can fix!