Files
java-core-examples/parallel-streams/output/02-common-pool-starvation.txt
T
Claude 4511cc6e6b parallel-streams: JMH benchmarks and demos for when parallel streams are slower
N x Q model, source splittability, boxing, ordered operations, common-pool
starvation, and parallel-stream correctness bugs. Captured output in output/.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017ic4b6hCTuFrQT8xKmmMrF
2026-11-17 23:23:21 +05:30

16 lines
396 B
Plaintext

availableProcessors = 2
commonPool parallelism = 3
1. Victim alone
victim took 201 ms
2. Victim while a neighbour BLOCKS the common pool (8 tasks x 2000 ms)
victim took 803 ms
3. Same neighbour, but it runs in its OWN ForkJoinPool(3)
victim took 200 ms
4. 20 blocking tasks x 200 ms: parallel stream vs virtual threads
parallel stream : 1002 ms
virtual threads : 216 ms