I played with Thread::Pool, and seems fine. What I did is:
fork a new process
exit the main process
in the forked process, initialize Thread::Pool
the forked process start an endless loop to dispatch jobs to thread pool. The job my threads do is simple, just take two numbers, and return the sum.
Two points:
It sounds to me more logical to fork first, and then initialize the Thread::Pool, indeed the Thread::Pool object has nothing to do with the main process, from the design view, it should be contained in a smaller as possible scope.
The error msg you got saying exit when other threads running, is because you exited main process, without first stop or join all threads.