I'm confused. First you say:
My perl script is used to run some kind of a pipeline. I start by reading a JSON file with a bunch of parameters in it. I then do some work - mainly building some data structures needed later and calling external programs that generate some output files I keep references to.
... but now you say the subroutines don't use any common data. I think I need more explanation, as to which is what your actual situation is.
If your subroutines don't need any common data, consider making them into separate programs, or simply running them in separate threads (if you really want to use threads, which I would want to avoid, then). If your subroutines depend on data prepared by each other, make them communicate through queues. If your subroutines depend on data read by the main program, feed each subroutine its data through a queue.
In reply to Re^11: adding a hash to a shared object
by Corion
in thread adding a hash to a shared object
by daverave
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |