I'm a little confused on what pcntrl_fork does.
I'm looking to run several different processes concurrently. Each process contacts another server looking for information. When all the processes are done, I can move forward in the script.
Each process takes around 5 seconds. When I run them serially, my script can take over a minute to run. If I can run all the processes simultaneously, my script execution should be less than 7 seconds.
Is forking the same as multi-threading?
Can I use pcntrl_fork to start up several simultaneous processes and then have the script wait for the processes to finish?
Can you attach a basic code snippet?
Much appreciated.