Process::Group is a class for coordinating and managing multiple
processes which execute concurrently in fibers.
In some of my testing scripts, multiple processes need to run. In the
I’ve just done this sequentially. However, I’ve been modernising some
scripts and I’ve bundled up the code into this gem.
Now I can run like this:
group = Process::Group.new
Process::Group allows you to run the two tasks concurrently and in these
cases it was an easy option to modernise existing scripts. You can call
spawn multiple times in a fiber and it will work as expected. You can
kill the entire group of processes if you wish.
Examples, documentation and code: