Randal Schwartz wrote an example link checker which used forked processes to run tasks in parallel. Each child process created has a read pipe from and a write pipe to the parent (created with IO::Pipe).
The result is an inverted version of my preferred architecture. I like the parent to dump work on a queue and whichever child is ready to pull it off. This is pretty easy to do with threads.
In Randal’s version, the parent figures out which child is available to do work.
I’ve written code like that too. In fact, I’ve written the Link Checker about 15 different ways in the history of my columns.
I’ll need to take a look at the other 14 versions to see if I can pick up some more handy tips