Work stealing schedules parallel work by letting an idle Haskell execution context take a spark from a shared spark pool and evaluate it. section 13.4.3
The runtime handles the main scheduling details:
- rpar places a computation, represented by a spark, into the spark pool without waiting for it to finish. section 13.4.3
- An available Haskell execution context steals a spark and evaluates its underlying thunk in parallel. section 13.4.3
- Sparks can become duds, fizzle, overflow, or be garbage collected; the runtime manages these cases. section 13.4.3
Parallel list evaluation
Control.Parallel.Strategies can apply rpar across a list with evalList, while withStrategy starts the chosen evaluation strategy. Chunking work reduces excessive spark creation for large vectors.
Figure 13.5 Haskell execution contexts and spark pools
A figure showing Haskell execution contexts taking sparks from shared spark pools. section 13.4.3




