http://www.perlmonks.org?node_id=928931


in reply to Re: Question about Parallel::ForkManager
in thread Question about Parallel::ForkManager

So there is no way to avoid disk memory usage?
It's not good in terms of performance. But also since I may have many calls from clients on the server will not they race for the same tmp file?
Also, say if the process is interrupted by some reason in the middle the tmp file will never be removed.
  • Comment on Re^2: Question about Parallel::ForkManager

Replies are listed 'Best First'.
Re^3: Question about Parallel::ForkManager
by ikegami (Patriarch) on Sep 30, 2011 at 22:01 UTC

    I didn't realized it used the disk. Pipes could be used, so I'm curious why it uses the disk. (Ah yes, using pipes would prevent the parent from doing other work while the children are running. This is usually not a problem, but it would break P::FM's interface to support this.)

    There won't be a race condition. It surely defends against that using the process id in the file name.

      Maybe I can do something simple with "fork" and pipes? If you have a solution could you give it to me.
        I don't have that handy, no. If you're ok with a solution that uses threads, I can provide that.