Concurrent Execution#

Doing work in parallel. pperl ships two distinct concurrency stories and they answer different questions:

  • Auto-parallelizationpperl’s runtime detects parallelisable patterns in ordinary Perl and spreads them across cores without any user-level threading. This is the preferred answer for CPU-bound loops over large data.

  • Classical ithreads (partial support) — Perl 5’s threads and threads::shared model. pperl’s support here is deliberately limited; many programs that historically used ithreads are better rewritten against the auto-parallel path.

Start with the decision chapter if you have an existing threaded program and are deciding how to port it; start with parallel if you are writing new code and want to understand when pperl speeds your loop up.