Do you have a question? Post it now! No Registration Necessary. Now with pictures!
- Posted on
- Thread alternative for multi-processing?
April 16, 2008, 8:44 am
rate this thread
make the full use of my CPU time,
e.g. I have a function, which takes a file name as input, do some text
processing (e.g. CPU intensive), and save it back.
I don't want to use thread, as it need to recompile perl on all my
machines and I am not sure if it is stable enough to affect other
I don't mind to have a little overhead in using the fork mode (i.e.
multi-process). I want to know are there any recommended module for
For example, I am trying Parallel::ForkManager, POE::Wheel::Run, so
anyone want to share the experiences?
Re: Thread alternative for multi-processing?
The saving it back might be a problem. Do the lines have to be saved
back in the same order they are originally present? With parallel,
it requires special efforts to make that happen.
In this case, I'd tend to role my own forking. I generally use
Parallel::ForkManager for when the number of processes I want run is
greater than the number I want to run simultaneously, which doesn't seem to
be the case for you. You certainly *can* use it in other cases, I just
don't see much need to. I've looked into POE::Wheel::Run a few times but
never got over the activation barrier to actually use it.
-------------------- http://NewsReader.Com/ --------------------
The costs of publication of this article were defrayed in part by the
payment of page charges. This article must therefore be hereby marked
advertisement in accordance with 18 U.S.C. Section 1734 solely to indicate
- » ssh on command line: force using a group size (prime size) of 1024 (and no...
- — The site's Newest Thread. Posted in » Secure Shell Forum