![]() |
|
"be consistent" | |
PerlMonks |
Re^2: Unexpected output from fork (Win32)by maa (Pilgrim) |
on Aug 09, 2004 at 14:03 UTC ( #381229=note: print w/replies, xml ) | Need Help?? |
As your lines are 16 bytes, and each kid is processing 256 lines per buffer load, that makes the buffer size 4096 bytes. Notionally, the first thread to run will process lines 1..256 then 2561..2817 then 5121..5377 etc. How blindingly obvious :-) Thanks. This was only a test program - I put the sleep statement in because the first thread processed all 10_000 without it and the operations that will eventually be in there will certainly take several seconds to complete. Once again thanks for a crystal clear explanation! It all makes sense now. - Mark
In Section
Seekers of Perl Wisdom
|
|