Pass all the data between your subroutines via Thread::Queue. Each subroutine can be its own thread that reads from one queue and writes to the next queue. That way you have no shared data at all.
In reply to Re^3: adding a hash to a shared object
by Corion
in thread adding a hash to a shared object
by daverave
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |