I think mixing forking and threads is asking for trouble. (Particularly if you're on Win32 when forking is threads.)
Several people have reported good results using Parallel::ForkManager for things they otherwise might want to do with threads. I haven't used it personally, but there's a tutorial if you want to give it a try.
-xdg
Code written by xdg and posted on PerlMonks is public domain. It is provided as is with no warranties, express or implied, of any kind. Posted code may not have been tested. Use of posted code is at your own risk.
In reply to Re: Using forks and threads
by xdg
in thread Using forks and threads
by ColinHorne
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |