Next 0.2 But we have processes for this! Prev

But we have processes for this!

The differences between processes are threads are not fundamental:

  • more natural to share data with threads
  • more natural to synchronize data and code with threads
  • more natural to debug and test processes

Historically, threads were invented as lightweighted processes, i.e. supposed to waste less memory and CPU.

However Perl threads are not quite lightweighted...

Threads

Forked Processes

Next Perl Threads Prev