Indeed, you just need to avoid ithreads. They are terrible, and unlike any other form of thread on the planet, they are more expensive than ordinary heavy processes. My preferred solution is to use an event-based framework like POE or AnyEvent (I use POE) and rip out any tasks that cannot be made non-blocking in subprocesses using POE :: Wheel :: Run (or fork_call for AnyEvent). To write the application in this case requires more design work, but done correctly, this will give you effective code. From time to time, I also wrote code that simply uses fork and pipe (or open '-|' ) and IO::Select and waitpid directly within my own event loop, but you should probably consider that the symptom I learned is C up to perl, not a recommendation. :)
A word for the wise though: if you work on Windows, then this approach can be almost as bad as using ithreads directly, since Perl compensates for the lack of win32 fork() with iithreads, paying the same cost of creating iread (on CPU and memory) on each fork . This is actually not a good solution.
hobbs
source share