[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

Re: [MacPerl] Ensuring consent for multitasking



On Tue, Jul 06, 1999 at 08:43:42AM -0700, Rich Morin wrote:
} I have a script (based on File::Find) that rummages through a few
} thousand directories, examining many thousands of files.  It prints
} out one line per directory during an acquisition phase, then prints
} a summary report file in the second (and final) phase.
} 
} The script works just fine, but it is unwilling to let any other app
} come to the foreground while it is running.  Is there something I
} should do to ensure that other applications can come in?  (Just doing
} I/O isn't enough; its already doing quite a bit of that...)
} 

IDE drive or SCSI?  I see this all the time when accessing my IDE
drive.  The only suggestions I have are either to just wait and let
MacPerl do its thing. or try to switch MacPerl to the background
*immediately* after starting the script.  Maybe a sleep at the
beginning would allow you to do this.  Moving it to the background
will slow the script down tremendously, but will allow you to do other
things on the machine.

} One possibility is calling sleep every 10 directories or so, but
} this seems pretty hokey and would slow the script down quite a bit.
} If this were Unix, I could do a nice(); does Mac OS have anything of
} that sort?

If this were Unix, you wouldn't have this problem.  I don't know of
any way of messing with MacOS scheduling aside from a vague
recollection that a ResEdit hack might do it.  If so, someone must
have written a program to make it easier to do.

} 
} More generally, all suggestions are welcome!
} 
} -r
} --
} Rich Morin:          rdm@cfcl.com, +1 650-873-7841, http://www.ptf.com/~rdm
} Prime Time Freeware: info@ptf.com, +1 408-433-9662, http://www.ptf.com
} MacPerl: http://www.macperl.com,       http://www.ptf.com/ptf/products/MPPE
} MkLinux: http://www.mklinux.apple.com, http://www.ptf.com/ptf/products/MKLP
} 
} ===== Want to unsubscribe from this list?
} ===== Send mail with body "unsubscribe" to macperl-request@macperl.org
} 
} 

-- 
Paul Schinder
schinder@pobox.com

===== Want to unsubscribe from this list?
===== Send mail with body "unsubscribe" to macperl-request@macperl.org