Subject: | Provide a way to do a real blocking wait for child processes |
I wanted to use this code in a manager process to spin up a few children and then keep spinning up new children whenever an old one exited. However, internally, PFM always ends up doing some sort of busy loop, and the public ->wait_for_available_procs() method does a _very_ busy loop. In a system where you expect the children to be long-lived, this means that the parent process is going to be burning a lot of CPU doing nothing.
I could patch ->wait_for_available_procs() to use a blocking wait, or add a separate method. It seems like a method named "->wait..." should actually block, though.