http://www.perlmonks.org?node_id=1090321


in reply to Splitting large array for threads.

A few points if I may?

I can't see why your process would be stalling though. Usually I would look for an empty queue or a lock. Can I suggest inserting:

$Q -> pending();

Into that loop, for the sake of verification. My guess is that you might be getting tripped up by that 'sleep' call. But can't tell for sure, because it seems to work ok with an 1800 line file.