Why architecture matters here
FJP fails on wrong granularity, common pool starvation, and blocking without ManagedBlocker. Architecture matters because task shape decides parallelism.
Advertisement
The architecture: every piece explained
The top strip is basics. RecursiveTask / Action. Fork + split. Worker deques. Work stealing.
The middle row is knobs. Common pool. ManagedBlocker. Parallelism param. Streams parallel.
The lower rows are ops. Task granularity. Metrics. Ops — isolate + tune.
Advertisement
End-to-end flow
End-to-end: parallel sum over 1M items. Split recursively down to 1k chunks. Workers steal tasks from busy deques. Total time N/parallelism + overhead.