[boulder.pm] IPC::Shareable examples?

Robert L. Harris Robert.L.Harris at rnd-consulting.com
Mon Aug 14 10:09:06 CDT 2000



Does anyone have any SIMPLE examples of using IPC::Shareable?  I've used
the one in PCB, which works at first, but then breaks.  Basically
what I'm trying to do:

Parent gets a list of files and put the names in an array.  A child is
forked, reads the first entry in the array.  It then modifies the file.
When done modifying, it pops that entry of the array and pushes it on
another.  The child then goes on to the next entry in the first array,
until they're all done.

The parent, seeing the entry in the second array, forks a child to modify
that file.  This child does it work, does another pop/push combination
and then exits.  

The first process is IO bound, the second is CPU bound, thus the desire
to split them out and let them run at the same time.  Doing this manually
simultaneously is definitely faster than in series so I'm trying to do 
it with IPC.  I had something kinda working with the parent just keeping
track of the names, but there were times that got REAL ugly.

Anyone have any examples that come close to something like this?  This is
just for fun, and not work so I don't have a company willing to pay anything
for it.

Robert



:wq!
---------------------------------------------------------------------------
Robert L. Harris                |  Micros~1 :  
Senior System Engineer          |    For when quality, reliability 
  at RnD Consulting             |      and security just aren't
                                \_       that important!
DISCLAIMER:
      These are MY OPINIONS ALONE.  I speak for no-one else.
FYI:
 perl -e 'print $i=pack(c5,(41*2),sqrt(7056),(unpack(c,H)-2),oct(115),10);'




More information about the Boulder-pm mailing list