in reply to Re: Re: Why use threads over processes, or why use processes over threads?
in thread Why use threads over processes, or why use processes over threads?

There still seems to be a problem with processes not getting reaped when calculating sizes. The combination of Benchmark::Thread::Size and forks becomes something akin to a fork bomb. Preliminary size test shows this:
$ perl5.8.2-unthreaded -Mforks -MBenchmark::Thread::Size=times,1 (ref) 1 100 # (ref) + 0 3364 1 2836 2 2800 5 2800 10 2800 20 2800 50 2800 100 2804
but I'm starting to have doubts whether the size calculation is correct. I don't have time to look into it further right now...

This test was done with my internal development versions of forks and Benchmark::Thread::Size. Don't try this at home with the release versions yet!

Liz

  • Comment on Re: Re: Re: Why use threads over processes, or why use processes over threads?
  • Download Code