Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"

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??

in reply to Re: Unexpected output from fork (Win32)
in thread Unexpected output from fork (Win32)

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

  • Comment on Re^2: Unexpected output from fork (Win32)

Log In?

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://381229]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (3)
As of 2023-05-31 16:50 GMT
Find Nodes?
    Voting Booth?

    No recent polls found